Re: [css-houdini-drafts] [css-properties-values-api] Rationale for `registerProperty()` taking precedence over `@property`? (#943)

The rationale is that JS is generally more explicit of a signal than CSS, and this is more or less reflected in other CSS APIs, such as `.style` winning over stylesheet declarations by default.

Also, if you're using JS already, using the JS API is *far* easier than manipulating the OM of a stylesheet, if you want to add a declaration without regards to what's already defined. You might not even be *able* to find the last @property instance, because it might be in a cross-origin stylesheet (which doesn't expose its contents). So since JS has to be either behind all CSS, or in front of all CSS, putting it in front just seems more convenient.

(Closing because question is answered; feel free to continue discussion if necessary.)

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/943#issuecomment-530144080 using your GitHub account

Received on Tuesday, 10 September 2019 22:25:04 UTC