5 ms·
Why is it (or was it) important to separate CSS from HTML?
- news_to_me 8y agoAn interesting writeup is also linked there: https://keithjgrant.com/posts/2015/05/against-css-in-js/ https://keithjgrant.com/posts/2015/05/against-css-in-js/
- jbob2000 8y agoSome frameworks have started to move away from the separation. Bootstrap has these ‘style’ classes like “text-center” and “pull-right”, which is essentially no different than doing “text-align: center” or “float: right” in the style attribute. I think a good developer will avoid being dogmatic about style and content separation. My philosophy has been simplicity above all else. I will use a style class if I can avoid some ugly CSS selectors, and if I see a tag with a million style classes, I’ll wrap those up into a single class instead. It takes a bit of iteration to reach a simple solution, but it pays off when you have to return to the code in six months.