- From: Guillaume via GitHub <sysbot+gh@w3.org>
- Date: Fri, 25 Aug 2023 06:24:08 +0000
- To: public-css-archive@w3.org
cdoublev has just created a new issue for https://github.com/w3c/csswg-drafts:
== [cssom-1] Set property value with priority when it is not allowed ==
Chrome/FF (at least) store a declaration specified with a priority with `CSSStyleDeclaration.setProperty()` when `CSSStyleDeclaration.parentRule` is a `CSSKeyframeRule`, but using `!important` is invalid in a keyframe rule:
```html
<style>
@keyframes foo {
from {}
to { color: green !important }
}
div {
animation: foo 2s infinite;
}
</style>
<script>
const { styleSheets: [{ cssRules: [keyframes] }] } = document
const { cssRules: [from] } = keyframes
from.style.setProperty('color', 'red', 'important')
keyframes.cssText // @keyframes foo { 0% { color: red !important; } 100% { }
</script>
```
Should *parse a CSS value* know that `value` is declared with a priority? Should it be replaced with another procedure, eg. *parse a CSS declaration* that would be given a manually crafted declaration?
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9241 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 25 August 2023 06:24:11 UTC