-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Use classes instead of attributes for scoping #1118
Labels
Comments
Attributes are main reason why I don't use scoped styles in Svelte. Classes really should be used for this. |
If we did something like #890 and deprecated passing a string (maybe allowing passing an array?) we could in a non-backwards compatibility way have no issue with making this change. |
Rich-Harris
added a commit
that referenced
this issue
Feb 24, 2018
Rich-Harris
added a commit
that referenced
this issue
Mar 8, 2018
Rich-Harris
added a commit
that referenced
this issue
Mar 8, 2018
Use classes for style encapsulation, rather than attributes
This is implemented in 1.57 |
This was referenced Mar 14, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Classes are always faster than attributes. We should consider using them:
It will complicate
<div class='{{whatever}}'>
slightly, because we'd now need to include the scoping string in theclassName
that it gets updated with.The text was updated successfully, but these errors were encountered: