Skip to content

fix(playground): render italic text as slanted in Safari#1707

Draft
caugner wants to merge 1 commit into
mainfrom
1269-playground-em-italic-safari
Draft

fix(playground): render italic text as slanted in Safari#1707
caugner wants to merge 1 commit into
mainfrom
1269-playground-em-italic-safari

Conversation

@caugner

@caugner caugner commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

🚧 Needs companion PR in mdn/dex 🚧

Description

Fix <em> and other italics rendering upright in interactive-example runners on Safari, by explicitly driving Inter's slnt variable-font axis for italic elements in the ix-tabbed and ix-choice runners.

Motivation

The runners load Inter as a single variable @font-face from Inter.var.woff2, which exposes a slnt axis (-10 to 0) but no ital axis, declared as font-style: oblique 0deg 20deg. Safari trusts that declaration and neither drives the slant axis from font-style: italic nor synthesizes an oblique, so italics render upright. Chrome and Firefox slant them regardless.

Additional details

Related issues and pull requests

Fixes #1269.

Interactive example runners load Inter as a single variable `@font-face`
from `Inter.var.woff2`, which exposes a `slnt` axis (`-10` to `0`) but no
`ital` axis, declared as `font-style: oblique 0deg 20deg`. Safari trusts
that declaration and neither drives the slant axis from `font-style:
italic` nor synthesizes an oblique, so `<em>` and other italics render
upright.

Explicitly set `font-variation-settings: "slnt" -10` on italic elements
in the `ix-tabbed` and `ix-choice` runners so Safari slants them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

<em> in interactive examples doesn't render as italic in Safari

2 participants