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

CSSStyleDeclaration misses dashed attributes #1672

Open
jelhan opened this issue Jan 10, 2024 · 0 comments
Open

CSSStyleDeclaration misses dashed attributes #1672

jelhan opened this issue Jan 10, 2024 · 0 comments

Comments

@jelhan
Copy link

jelhan commented Jan 10, 2024

CSSStyleDeclaration has two attributes for each CSS property. A dashed and a camelCase representation. The CSSStyleDeclaration interface only contains the camelCase representation currently.

partial interface CSSStyleDeclaration {
  [CEReactions] attribute [LegacyNullToEmptyString] CSSOMString _dashed_attribute;
};

The dashed attribute attribute, on getting, must return the result of invoking getPropertyValue() with the argument being dashed attribute.

Setting the dashed attribute attribute must invoke setProperty() with the first argument being dashed attribute, as second argument the given value, and no third argument. Any exceptions thrown must be re-thrown.

For example, for the font-size property there would be a font-size IDL attribute. In JavaScript, the property can be accessed as follows, assuming element is an HTML element:

element.style['font-size'];

https://www.w3.org/TR/cssom-1/#dom-cssstyledeclaration-getpropertyvalue

Please find a demonstration of this issue here: Playground Link

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

No branches or pull requests

1 participant