Re: [csswg-drafts] [css-properties-values-api] "Property registration cannot be scoped" differs from all implementations in a consistent way (#10541)

> > Probably, internal declarations take precedence for::host, and external one for ::part, with perhaps an option to override with !important.
> 
> That is the opposite to how usual cascade order behaves for `:host` tho, right? See also #6466.

I think this is less about cascade order, and more about the notion of making shadow-defined property declarations not inherit from the parent tree.

If we allow that, it makes sense that the definition of "private" is for where the stylesheet was defined and not to where the element resides, because the `@property` declarations are part of a stylesheet and not part of an "element".

Since `:host` is defined in the inner scope, it should share the inner scope definitions.
Since `::part` is defined in the outer scope, it should share the outer scope definitions.

I'm not sure if this is entirely in line with #6466, or if it should/can be.

> 
> That said I dislike the other option even more... having multiple registrations for the same property name seems rather unfortunate and confusing, and raises tons of questions about how would things like computed style enumeration work and such.

Yea, I am hesitant to go that far. A property should have only a string as a key, we've complicated the world enough (despite the benefits of that solutions on its own accord) 

-- 
GitHub Notification of comment by noamr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10541#issuecomment-2447038532 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 30 October 2024 12:49:00 UTC