Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Italic not showing on Safari #7203

Closed
3 tasks done
Josh-Cena opened this issue Sep 20, 2022 · 6 comments · Fixed by #10828
Closed
3 tasks done

Italic not showing on Safari #7203

Josh-Cena opened this issue Sep 20, 2022 · 6 comments · Fixed by #10828
Labels
🐛 bug Something isn't working, or isn't working as expected help wanted If you know something about this topic, we would love your help! 🐌 idle Issues and PRs without recent activity. Flagged for maintainer follow-up. idle p2 We want to address this but may have other higher priority items. typography Issues related to font color/decoration/size/weight

Comments

@Josh-Cena
Copy link
Member

Summary

On Safari, italic font is exactly the same as the normal upright version.

URL

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Memory_Management#weakmaps_and_weaksets

Reproduction steps

Read the sentence:

WeakMap and WeakSet got the name from the concept of weakly held values.

Expected behavior

Chrome/Firefox rendering:

image

Actual behavior

Safari rendering:

image

(Reproducible on iPad/iPhone as well)

Device

Laptop

Browser

Safari

Browser version

Stable

Operating system

Mac OS

Screenshot

No response

Anything else?

No response

Validations

@github-actions github-actions bot added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Sep 20, 2022
@Elchi3
Copy link
Member

Elchi3 commented Oct 17, 2022

I can reproduce this issue, fwiw.

@caugner caugner added 🐛 bug Something isn't working, or isn't working as expected p2 We want to address this but may have other higher priority items. typography Issues related to font color/decoration/size/weight accepting PR We invite you to open a PR to resolve this issue. and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Oct 24, 2022
@caugner
Copy link
Contributor

caugner commented Oct 24, 2022

This doesn't seem to be a general issue in Safari, see: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/em#result

So it looks like an issue with the font (Inter) we're using.

@caugner caugner added help wanted If you know something about this topic, we would love your help! and removed accepting PR We invite you to open a PR to resolve this issue. labels Oct 24, 2022
@github-actions github-actions bot added the 🐌 idle Issues and PRs without recent activity. Flagged for maintainer follow-up. label Nov 30, 2022
@github-actions github-actions bot added the idle label Dec 30, 2022
@ironnysh
Copy link
Contributor

ironnysh commented Jan 7, 2024

Hi,
seems like it's missing a font-variation-settings: "slnt" -10; on em elements (see also this reference).

Here's a screenshot from Safari 17.2.1:

image

@ironnysh
Copy link
Contributor

ironnysh commented Jan 7, 2024

@caugner --I'm happy to open a PR, but I'm not sure in which stylesheet it belongs :-)

@github-actions github-actions bot removed the idle label Jan 7, 2024
@github-actions github-actions bot added the idle label Feb 7, 2024
@caugner
Copy link
Contributor

caugner commented Mar 25, 2024

@caugner --I'm happy to open a PR, but I'm not sure in which stylesheet it belongs :-)

@ironnysh Sorry for taking so long to get back to you. I think the best place to add the CSS is around here:

a {
text-decoration: none;
}
/* Make images easier to work with */
img,
picture {
display: block;
max-width: 100%;
}

@github-actions github-actions bot removed the idle label Mar 26, 2024
ironnysh added a commit to ironnysh/yari that referenced this issue Apr 1, 2024
Text marked with <em> element is not slanted. See issue: mdn#7203
@ironnysh
Copy link
Contributor

ironnysh commented Apr 1, 2024

@caugner, done now :-)

@github-actions github-actions bot added the idle label May 2, 2024
caugner added a commit that referenced this issue May 2, 2024
* Fix: Inter italic bug in Safari

Text marked with <em> element is not slanted. See issue: #7203

* fix(fonts): apply font-variation-settings to all italic elements

* fix(fonts): unset font-variation-settings where font-style is unset

* fix(fonts): set font-variation-settings: normal where font-style: normal

* revert: do not set font-variation-settings for mathml polyfill

---------

Co-authored-by: Claas Augner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working, or isn't working as expected help wanted If you know something about this topic, we would love your help! 🐌 idle Issues and PRs without recent activity. Flagged for maintainer follow-up. idle p2 We want to address this but may have other higher priority items. typography Issues related to font color/decoration/size/weight
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants