CSS Naming advice
Hey guys, I'm kind of a noob and I was wondering if you could give me some feedback in my css class naming. I'm trying to use a BEM based approach where I only use classes as selectors and I wondered if it looks acceptable to you or if I will have problems writing css like this. Hope you can help me out
5 Replies
Adding an screenshot for reference
yes I think it does look clean and very readable
lots of devs are used to this format and being able to name ur classes like this would help u get a job 👍
i think you should take a look at atomic css in the future
as it seems to be what the web development world is moving towards
atomic css is rather than describing the item itself in one class, i.e .avatar
it would be
.card .bg-primary .rounded-full
(basically tailwind)
Thanks man, some of my classmates say they do not understand it and I was getting discouraged. And I'm gonna give it a go. Sadly, BEM is incredibly complex to be implemented fully so I was wondering if there was a more lightweight approach to css that I could learn to improve my vanilla css before moving into tailwind
Thanks for your kind words man
yeah man I used to have shit vanilla css
myself
I just moved onto tailwind tho
been using it for 7 months and never even looked back
Fair enough, I do hope to jump to tailwind when I'm more comfortable with my css. Wanna understand the underlying tech a little bit more
Thanks for the feedback man. Have a nice one