You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With @scope defined in css-cascade-6, should authors be able to register custom properties with @property inside the scope, without those properties loitering the global space?
@scope (.card) {
/* Should --color be local to the scope or not? */@property --color {
…
}
}
If it should be scoped, should that happen automatically or should it be opt-in by means of an extra descriptor during registration?
The text was updated successfully, but these errors were encountered:
Global name-defining at-rules such as @keyframes or @font-face or @layer that are defined inside @scope are valid, but are not scoped or otherwise affected by the enclosing @scope rule.
Probably makes sense to keep this behavior, and make it an opt-int should we want to.
Use-case would be an author shipping a component with scoped styles, knowing that the custom properties they use don’t clash with the global namespace. Right now they need to work around this by prefixing their custom props, hoping nobody else uses that prefix.
With @scope defined in css-cascade-6, should authors be able to register custom properties with @Property inside the scope, without those properties loitering the global space?
With
@scope
defined in css-cascade-6, should authors be able to register custom properties with@property
inside the scope, without those properties loitering the global space?If it should be scoped, should that happen automatically or should it be opt-in by means of an extra descriptor during registration?
The text was updated successfully, but these errors were encountered: