templating-resources
templating-resources copied to clipboard
Should `scoped` support be dropped?
aurelia-pal
has FEATURE.scopedCSS
and aurelia-templating-resources
tries to add scoped
to injected <style>
when appropriate (e.g. <require from="control.css">
).
I wonder if this should be removed from Aurelia, to re-align with the current HTML specs.
scoped
was dropped from the specs (in favor of shadow DOM) and the only browser that implements it (at least for now -- maybe they'll drop it at some point) is Firefox.
I agree that something that is no longer on a standards track and only works in one browser anyway, should probably be removed. However, that leads to another question:
What is the recommended way to achieve CSS scoping, and what are the thoughts on it going forward? I can't seem to find anything in the docs related to this.
At the time I opened this ticket, scoped
was supported by Firefox, meaning it would have been a breaking change to remove it, as someone could have built an Aurelia app targetting FF only.
Since then, FF has moved that feature behind a config flag in FF 55, which means it works in no browser at all today. This is dead code and I think at this point we should remove it.
@thomas-darling Shadow DOM standard has replaced scoped styles. Styles inside a shadow DOM don't bleed out (and vice-versa). You can read more about it here, go to Styling section: https://developers.google.com/web/fundamentals/web-components/shadowdom
Non-standard stuff that I find interesting is CSS Modules, google it.
if the decision is to drop it, help_needed and prs_welcome are appropriate tags for this.
Ok there is a silent consensus that this should be removed. As nobody objects. Is is a ctrl-a shift-del operations? Or it needs a week to carefully delete some lines of code?

@bigopon