Skip to content

[css-fonts] Missing serialisation for 0 ranged descriptors inside @font-face #7925

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

Closed
tursunova opened this issue Oct 20, 2022 · 5 comments
Closed
Labels
css-fonts-4 Current Work

Comments

@tursunova
Copy link

tursunova commented Oct 20, 2022

In the spec there is no specification on whether 0 ranged font-stretch, font-style and font-weight descriptors inside @font-face rule should be simplified or not. E.g., if font-weight: 200 200; is specified inside @font-face then it's not clear on whether rule.style.getPropertyValue("font-weight") should return 200 or 200 200. Chrome and Safari are currently returning 200 200 while Firefox is returning just 200.

The issue was also discussed in the conversation in WPT PR #36489

@tursunova tursunova changed the title [css-fonts] [css-fonts] Missing serialisation for 0 ranged descriptors inside @font-face Oct 20, 2022
@drott drott added the css-fonts-4 Current Work label Oct 20, 2022
@tursunova
Copy link
Author

Since there is a general rule to serialize things in a simpler form in spec:

If component values can be omitted or replaced with a shorter representation without changing the meaning of the value, omit/replace them.

I'm proposing to simplify 0 ranged descriptors inside @font-face rule as well.

@svgeesus
Copy link
Contributor

That makes sense to me.

@svgeesus
Copy link
Contributor

@tursunova sorry for the delay; I added Agenda+ a while ago but we have a backlog, more items to discuss than we can cover in a week.

@tursunova
Copy link
Author

@svgeesus no worries, thank you for adding Agenda+

@fantasai
Copy link
Collaborator

fantasai commented Dec 6, 2022

@svgeesus I think you can just accept this under Editor Discretion, since it's just a corollary of the serialization principles.

jakearchibald pushed a commit to jakearchibald/csswg-drafts that referenced this issue Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-fonts-4 Current Work
Projects
None yet
Development

No branches or pull requests

4 participants