- From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
- Date: Mon, 13 Aug 2018 18:36:48 +0000
- To: public-houdini-archive@w3.org
I *really* want the typed value to be grammar-checked when subbed into real (or registered custom) properties, but I don't think I can reasonably do that without a ton of complexity. Combined with the resolution that registering a property must not cause a reparse of the stylesheet (any custom properties whose values violate the now-registered grammar just trigger invalid-at-computed-value-time), I think this is literally impossible to do. I think I need to go back on my intent from #321 and just say that all custom properties substitute via token streams, regardless of registration status. The grammar just gives you a lot of useful abilities since we know the value's type (IDE/styleMap.set() error checking, computed value absolutization, animation, TypedOM representation...), but otherwise doesn't alter the behavior of variables. However! I don't want to say that they retain their *original* token streams - that's an additional storage cost that's rather annoying, not to mention confusing in cases like what you provided. I need to instead define how to token-stream-ize a registered value, so it can be substituted in a reasonable manner. Your example, then, would compute --x to a `20px` value, which would then token-stream as a `20px` dimension token, making the child's height 20px. -- GitHub Notification of comment by tabatkins Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/792#issuecomment-412620268 using your GitHub account
Received on Monday, 13 August 2018 18:36:49 UTC