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

@font-face/font-weight: expand on <font-weight-absolute>{2} importance #10910

Open
danburzo opened this issue Dec 1, 2021 · 0 comments · May be fixed by #32853
Open

@font-face/font-weight: expand on <font-weight-absolute>{2} importance #10910

danburzo opened this issue Dec 1, 2021 · 0 comments · May be fixed by #32853
Labels
Content:CSS Cascading Style Sheets docs effort: medium This task is a medium effort. help wanted If you know something about this topic, we would love your help!

Comments

@danburzo
Copy link
Contributor

danburzo commented Dec 1, 2021

MDN URL: https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-weight

What information was incorrect, unhelpful, or incomplete?

There should be more ample space devoted to font-weight ranges (<font-weight-absolute>{2}) required for variable fonts to work reliably across browsers.

I've only just started writing my first variable font CSS today, off the cuff, so I don't have an insight on the history of the spec / known browser quirks, but pretty soon I discovered that not mentioning a font-weight range in @font-face causes issues in Chrome and Safari.

In particular, the example in the Variable fonts section of the more famous font-weight CSS property of the two currently doesn't work in Chrome due to this omission. I have opened a PR on the css-examples repo to address it:

What did you expect to see?

The expansion of the "Variable fonts" section with a note about the importance of adding a font-weight range, and ideally an sample @font-face declaration for variable fonts in the Examples section.

Did you test this? If so, how?

Tested before/after code in the aforementioned PR in Chrome.

MDN Content page report details
@github-actions github-actions bot added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Dec 1, 2021
@Rumyra Rumyra added the Content:CSS Cascading Style Sheets docs label Dec 3, 2021
@sideshowbarker sideshowbarker added help wanted If you know something about this topic, we would love your help! effort: medium This task is a medium effort. and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Jun 22, 2022
@Josh-Cena Josh-Cena changed the title Issue with "@font-face/font-weight": Document <font-weight-absolute>{2} Oct 1, 2023
@Josh-Cena Josh-Cena linked a pull request Jun 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:CSS Cascading Style Sheets docs effort: medium This task is a medium effort. help wanted If you know something about this topic, we would love your help!
3 participants