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

[cssom] "case-sensitive match for a supported CSS property"? #580

Closed
SimonSapin opened this issue Oct 7, 2016 · 1 comment · Fixed by #631
Closed

[cssom] "case-sensitive match for a supported CSS property"? #580

SimonSapin opened this issue Oct 7, 2016 · 1 comment · Fixed by #631
Labels

Comments

@SimonSapin
Copy link
Contributor

In each of:

… one of the steps is:

If property is not a case-sensitive match for a supported CSS property, terminate this algorithm.

… with a link to:

https://drafts.csswg.org/cssom/#supported-css-property

The term supported CSS property refers to a CSS property that the user agent implements, including any vendor-prefixed properties, but excluding custom properties.

(Emphasis added.)

This does not match the behavior of at least Firefox and Chromium, where the matching is (probably ASCII) case-insensitive, and custom properties are not excluded:

document.documentElement.style.setProperty("Color", "green")
document.documentElement.style.setProperty("--a", "b")
assert_equals(document.documentElement.style.getPropertyValue("color"), "green");
assert_equals(document.documentElement.style.getPropertyValue("--a"), "b");
@SimonSapin
Copy link
Contributor Author

The case-sensitive match makes sense since property was ASCII-lower-cased in a previous step. This leaves excluding custom properties.

By the way, custom property names should not be lower-cased:

document.documentElement.style.setProperty("--A", "b");
assert_equals(document.documentElement.style.getPropertyValue("--A"), "b");
assert_equals(document.documentElement.style.getPropertyValue("--a"), "");

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

Successfully merging a pull request may close this issue.

1 participant