Re: [csswg-drafts] [css-variables] Add User Agent properties and constant()

1. Any discussion of "properties" here is misplaced; there's no properties involved at all. This is just a new CSS function, with similar substitution behavior to var().  Call them "constants" or "global variables".

2. *Do* we want to use the exact same substitution behavior as variables? Variables have to be delayed until computed-value time, because they depend on inheritance. Global variables don't - there's nothing stopping us from making their substitution happen at parse-time, giving us all the normal grammar interactions (knocking out a declaration at parse time so it falls back to a previous declaration, etc).  It does mean a change in a variable effectively 

3. If we want to allow people to set these values in stylesheets (I think we do), the right avenue is with an at-rule: `@global <custom-ident> <declaration-value>;`.  If we expose this in the JS API, we'll need to keep track of which names are managed via CSS, so that when you mutate it via JS it mutates the CSSOM as well. I presume that if you set if via JS, then add a CSS rule, the CSS would win?

GitHub Notification of comment by tabatkins
Please view or discuss this issue at using your GitHub account

Received on Friday, 15 September 2017 21:28:47 UTC