In this post, I'll be sharing some of my methodologies in writing CSS and will show some component examples.
Feel free to comment and share some ...
For further actions, you may consider blocking this person and/or reporting abuse
Why you prefer the PascalCase if everything else has almost always been camelcase?
So in one project you have pascal in css and camel in js.
Hey Teippi, I use
PascalCasefor the component name itself andcamelCasefor both component's modifier and elements. The reason why it gives identification that it's a component and not modifier or element.Here's an example to give more clarity on how I approach my CSS. Let's say we have a
ListGroupcomponent:As stated in my post, since React components are in
PascalCasealready. Naming its class name inPascalCaseformat would be reasonable as well. Here's a React example:I hope this explanation helps. Cheers! 🍻