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

[css-fonts] CSSFontFaceDescriptors is missing descriptor attributes #10107

Open
cdoublev opened this issue Mar 21, 2024 · 2 comments
Open

[css-fonts] CSSFontFaceDescriptors is missing descriptor attributes #10107

cdoublev opened this issue Mar 21, 2024 · 2 comments
Assignees

Comments

@cdoublev
Copy link
Collaborator

CSSFontFaceDescriptors seems to be missing font-weight (not fontWeight) and font-stretch/fontStretch (legacy).

CSS Fonts 5 may also missing a partial interface definition with font-size/fontSize, size-adjust/sizeAdjust, and *-override/*Override.

A simpler alternative is proposed in #10105.

@svgeesus
Copy link
Contributor

Agreed, the missing font-weight looks like a simple error and the legacy values are an over-eager rename rather than a deprecation, which was the csswg resolution.

I don't follow about the "simpler alternative".

@cdoublev
Copy link
Collaborator Author

CSSFontFaceDescriptors attributes would be defined generically, like CSSStyleProperties attributes.

For each CSS descriptor descriptor that is a supported CSS descriptor accepted in @font-face, the following partial interface applies where _camel_cased_attribute is obtained by running the CSS property to IDL attribute algorithm for descriptor.

partial interface CSSFontFaceDescriptors {
  attribute [LegacyNullToEmptyString] CSSOMString _camel_cased_attribute;
};

And similarly for dashed attributes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants