2 ms·
This made me crack up. I do this all the time and thought it was because I was "bad" at CSS, having not kept up with the times. Is there really no better way in
by icedchai 7y ago
This made me crack up. I do this all the time and thought it was because I was "bad" at CSS, having not kept up with the times. Is there really no better way in 2020?
- hobofan 7y agoOf course there is a better way, but as he/she said most people don't know it. And for a lot of projects that are built to spec once, and maintained with minimal tweaks for a few years (traditional agency projects), the "bad" way is good enough. If you want a better way for a project that you will have to maintain for a longer time that should be more flexible, I would personally suggest something like BEM[0] + a few best practices (like the one suggested in the post). This will already get you a long way. [0]: http://getbem.com/ http://getbem.com/
- gentleman11 7y agoI rather like using BEM but have only used for 6 months or so on short projects. What is the “BEM considered harmful” article in 5 years going to say that we don’t know now?
- duhi88 7y agothere is, it just sometimes doesn't matter. Styling an important or often reused component? You best find a better way. Adding a tagline to a marketing site or temporary banner? Yea, do whatever you want to get the job done. Just don't let your whole site look like that or you'll have angry teammates.