4 ms·
Sadly using only classes is now considered a "Best Practice" and some employers forbid id or are considering it as an antipattern [1] resulting in a clusterfuck
by tangue 10y ago
Sadly using only classes is now considered a "Best Practice" and some employers forbid id or are considering it as an antipattern [1] resulting in a clusterfuck of classes in the html. But best practices in CSS changes so often that I wouldn't be surprised if people starts to use id again in two or three years.
[1] https://github.com/airbnb/css https://github.com/airbnb/css
- dexterdog 10y agoThat's why just like not growing sideburns I'm not listening to this trend either. Use classes where there may be multiple. Use ID when it's a Highlander.
- madeofpalk 10y agoids do have some fortunate side effects, like magically creating global JS variables.