-
Notifications
You must be signed in to change notification settings - Fork 333
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
Remove use-component-name-as-style-scope #18
Comments
In our project, we always use component name as componet's root class. |
@yzb161114 that makes total sense. What doesn't make a lot of sense is to recommend nesting css selectors AND using <style scoped>. Maybe you shouldn't nest at all because of increased specificity. |
Hello @aristidesfl ! :D I see... Well, I think using BEM and/or OOCSS will guarantee the component will always have a specific context. This section is there just to put two good practices together and make good use of them while building components. I know that Anyhow, please, make a PR changing what you see fit and let's talk about it. Thank you again for your help @aristidesfl and @yzb161114 |
I will close this issue for now. It will be reopened when someone else has anything else to add about this matter. Thank you @aristidesfl and @yzb161114! You guys rock! :D |
Besides the readability issues which could result from the nesting:
Didn't make a PR because I would be removing something you wrote, so.. its up to you take it out if you think this point of view makes sense. Cheers! |
I would say this section is opinionated outside of the scope of Vue components, into a field of CSS which is controversial. It advises BEM and OOCSS which are methodologies which some people choose not to subscribe to knowingly.
Also exemplifies a kind of nesting one should probably avoid for a few reasons:
MyCompoennt li {}
Also advises to use both
<style scoped>
along with css scoping, without explaining any substantial benefit.https://github.com/pablohpsilva/vuejs-component-style-guide#use-component-name-as-style-scope
The text was updated successfully, but these errors were encountered: