templating-resources icon indicating copy to clipboard operation
templating-resources copied to clipboard

Should `scoped` support be dropped?

Open jods4 opened this issue 8 years ago • 5 comments

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.

jods4 avatar Feb 02 '17 00:02 jods4

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.

thomas-darling avatar Nov 09 '17 11:11 thomas-darling

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.

jods4 avatar Nov 09 '17 12:11 jods4

if the decision is to drop it, help_needed and prs_welcome are appropriate tags for this.

Alexander-Taran avatar Feb 27 '18 16:02 Alexander-Taran

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?

Alexander-Taran avatar Mar 24 '18 23:03 Alexander-Taran

image

@bigopon

Alexander-Taran avatar May 31 '22 22:05 Alexander-Taran