- From: Guillaume via GitHub <sysbot+gh@w3.org>
- Date: Fri, 27 Dec 2024 15:16:14 +0000
- To: public-css-archive@w3.org
cdoublev has just created a new issue for https://github.com/w3c/csswg-drafts: == [cssom-1] Trim the name argument `CSSStyleDeclaration.setProperty()` == This would also apply to [`CSSStyleDeclaration.getPropertyValue()`](https://drafts.csswg.org/cssom-1/#dom-cssstyledeclaration-getpropertyvalue), and possibly [`CSSStyleValue.parse()`](https://drafts.css-houdini.org/css-typed-om-1/#dom-cssstylevalue-parse) and [`CSSFontFeatureValuesMap.*()`](https://drafts.csswg.org/css-fonts-4/#cssfontfeaturevaluesmap). For `CSSStyleDeclaration` and `CSSStyleValue`, when `name` is not a custom property name, it is normalized to lowercase. I feel like it should be trimmed too: `style.setProperty(' /**/ color', 'green')` would be valid. It is currently invalid in all browsers (with or without the comment). There is no correspond test on WPT. Trimming whitespaces/comments is consistent with the CSS parser entry points (and algorithms). They are either ignored or trimmed in `value` (`style.setProperty('color', ' /**/ green ')` is valid), `CSSStyleSheet.insertRule()`, `CSSStyleSheet.replace*()`, `MediaList.appendMedium()`, etc. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11418 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 27 December 2024 15:16:15 UTC