Open
Description
Feature request: Support CSS elements selectors local scope
We're developing components library and we're looking for a way to locally scope CSS element selectors styles.
for example:
:local(button){
color: tomato;
}
I want this style to affect only 1 component and not the whole buttons on the page of whoever uses it.
(the :local selector doesn't affect the button style encapsulation. )
Is there already a library/plugin that does that?
If not - a possible solution would be to add hashed custom attribute as Angular does:
https://blog.thoughtram.io/angular/2015/06/29/shadow-dom-strategies-in-angular2.html - ViewEncapsulation.Emulated
TL;TR:
<button custom-generated-attribute >Press here</button>
button [custom-generated-attribute]{
color: tomato;
}
Metadata
Metadata
Assignees
Labels
No labels