Skip to content

Using class names instead of attributes would make scoped styles faster #4013

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

Closed
esprehn opened this issue Oct 22, 2016 · 1 comment
Closed

Comments

@esprehn
Copy link

esprehn commented Oct 22, 2016

Vue.js version

2.0.2

Vue per the docs is using a generated attribute names for scoped styles, for example it turns <style scoped> selectors from .a:hover into .a[vue-1]:hover. Matching and tracking the invalidation of attribute selectors is slow though, and you'd get much better RecalcStyle (see Chrome devtools timeline) performance if you use a generated class name like .a.vue-scope-1:hover {}

@fnlctrl
Copy link
Member

fnlctrl commented Oct 22, 2016

Scoped style isn't vue's feature, please open an issue in the vue-loader repo instead, thanks!

@fnlctrl fnlctrl closed this as completed Oct 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants