CSS Architecture and WordPress
-
I have been reading Harry Roberts, among others, on the subject of CSS architecture. See for example the excellent guidelines here:
https://cssguidelin.es
https://maintainablecss.comWhile there are a variety of approaches, there is consensus by those writing on this topic that one should aim for flat specificity – i.e. everything having the same level of specificity. Basically they all agree to have
.someclass { whatever; }
rather than for instance
.someclass a { }
Basically always aim to just use a class rather than mounting on extra specificity.
Relying only on body_class() and post_class() classes makes this approach impossible.Does anyone have any comments about CSS architecture in general and WP?
- The topic ‘CSS Architecture and WordPress’ is closed to new replies.