3 ms·
This is fantastic. While I disagree with some things (I'd rather standardize on px for everything, since em's have also been a huge headache for font-sizes), I
by crazygringo 15y ago
This is fantastic. While I disagree with some things (I'd rather standardize on px for everything, since em's have also been a huge headache for font-sizes), I love seeing the fact that this document exists.
I've written my own guidelines similar to this for different workplaces, though never publicized them. It would be wonderful if there could be some kind of consensus-best-CSS-practices standard out there, much like people have standardized on a couple common CSS resets, etc.
I've found that client-side developers tend to differ drastically in philosophies behind CSS coding, especially ones with less experience.
In my opinion, CSS is one of the most "dangerous" languages out there -- more often misunderstood and misused than any other language I've ever come across, including VB6 -- and thus most needing a standardized set of best practices.
- tomjen3 15y ago>consensus-best-CSS-practices standard out there No no no no. Best practices becomes an excuse for developers to switch of their minds and not think. In all cases there are exceptions to the best practices but people always forget that. The reason there are differences between what people prefer is that they work on different problems. That is a good thing and should be encouraged, not squashed.
- jader201 15y agoWhile I would never advocate developers not thinking for themselves, I think it's shallow to say that seeking out and following best practices is an excuse to not think. In fact, some languages, like Rails, are considered opinionated by imposing certain practices and standards in order to streamline the repetitive implementations that most applications need. This frees the developer to focus and think more about the more complex and less repetitive tasks. http://programmers.stackexchange.com/questions/12182/what-does-opinionated-software-really-mean http://programmers.stackexchange.com/questions/12182/what-do...
- goblin89 15y agoBest practices is a useful tool for developers to switch their minds on to real problems. I don't want to think how to align vendor-specific styles, whether to use a class or ID here, whether to create IE-specific stylesheet or not. While I can disagree with some points, I don't think it makes sense at all to express the disagreement. OP explicitly claimed that it's his best practices (not universal truth), and I think it's a very valuable thing to share anyway.