Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should scoped support be dropped? #270

Open
jods4 opened this issue Feb 2, 2017 · 5 comments
Open

Should scoped support be dropped? #270

jods4 opened this issue Feb 2, 2017 · 5 comments
Labels

Comments

@jods4
Copy link
Contributor

jods4 commented Feb 2, 2017

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.

@thomas-darling
Copy link
Sponsor

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.

@jods4
Copy link
Contributor Author

jods4 commented Nov 9, 2017

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.

@Alexander-Taran
Copy link

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

@Alexander-Taran
Copy link

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
Copy link

image

@bigopon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants