Re: [css-houdini-drafts] [css-properties-values-api] @property vs setProperty (#902)

This is why I was surprised to see you announcing @property before talking to me about it. ^_^

We need to nail down the semantics of @property, and how its differing ergonomics from `.registerProperty()` will play out.

Namely:

1. `.registerProperty()` can only be called once for a given property name. Further attempts fail with an error. 
 1. What happens when you have two @property rules for the same name?
 2. What if you have an @property in a stylesheet, remove it from the stylesheet, then reinsert it?
 3. What if you have an @property in a stylesheet, and then create a new rule for the same property name and use CSSOM to insert it into the sheet *before* the pre-existing one?
 4. What happens if you edit the text content of a `style` element, which re-parses and creates a fresh stylesheet from its contents?
2. There's no `.unregisterProperty()` anymore; once a property is registered it exists for the lifetime of the page.
 1. So what happens if you remove the @property rule using CSSOM?
 2. What happens if you remove the stylesheet itself using DOM?

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

Received on Thursday, 20 June 2019 20:59:30 UTC