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-weight page doesn't explain whether it is possible to set a range, or if so, how #32619

Closed
MarjaE2 opened this issue Mar 8, 2024 · 3 comments · Fixed by #36686
Closed
Labels
Content:CSS Cascading Style Sheets docs goal: completeness (Experiment label) Issues about content missing important/relevant details.

Comments

@MarjaE2
Copy link

MarjaE2 commented Mar 8, 2024

MDN URL

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

What specific section or headline is this issue about?

It's an overall issue

What information was incorrect, unhelpful, or incomplete?

  1. It doesn't explain whether it is possible for users to set a range. For example, users who have trouble reading thin text may want to set a minimum font-weight, without forcing all text to the same weight.
  2. If that is possible, it doesn't explain how.
  3. It mentions "multiple values" but doesn't explain if these set a range, and doesn't explain what else they do.
  4. If multiple values are supposed to set a range, then in Firefox they are ignored as an error.

What did you expect to see?

Information for users to set font-weight so that more pages will be readable.

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

MDN metadata

Page report details
@MarjaE2 MarjaE2 added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Mar 8, 2024
@github-actions github-actions bot added the Content:CSS Cascading Style Sheets docs label Mar 8, 2024
@caugner caugner added the goal: completeness (Experiment label) Issues about content missing important/relevant details. label Mar 15, 2024
@OnkarRuikar
Copy link
Contributor

OnkarRuikar commented Mar 21, 2024

There are two pages titled font-weight on MDN:

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

The first one, which takes only one value, is a property that is applied on elements in html:

div {
  font-weight: bold;
  font-weight: 100;
}

The second one, which can take two values, is applied only in context of the @font-face at-rule:

/* font definition */
@font-face {
  font-family: "MyCoolFont";
  src: url(./assets/fonts/my_cool_font.woff2);
  font-weight: 600 900;  /* here the range tells browser to select this font if weight lies in between 600-900 */
}

/* font use */
div {
  font-family: "MyCoolFont";
  font-weight: 700; /* here we tell browser that we want text of 700 weight */
}

You can play with it on MDN playground.


Perhaps you meant to look at the first page CSS/font-weight. To avoid the confusion we need to use a different title for @font-face/font-weight page, something like @font-face: font-weight.

@estelle @wbamberg Should we retitle all the pages under @font-face hierarchy like @font-face: prop?

@wbamberg
Copy link
Collaborator

@estelle @wbamberg Should we retitle all the pages under @font-face hierarchy like @font-face: prop?

Yes, I was thinking the same thing, it is very confusing having both pages with the same title, especially when most of the syntax is the same as well. But it is a whole conversation, and opens the question of whether we should also have more informative titles for other CSS pages, like "font-weight property".

@MarjaE2
Copy link
Author

MarjaE2 commented Mar 22, 2024

Rather than retitling, I'd suggest cross-linking to related pages at the beginning of each article. It mentions the other pge early on, but I thought it must be linking back to itself.

@Josh-Cena Josh-Cena removed the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Jun 7, 2024
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 goal: completeness (Experiment label) Issues about content missing important/relevant details.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants