DEV Community

Discussion on: Does WordPress need to update some of it's CSS coding standards?

Collapse
 
alohci profile image
Nicholas Stimpson • Edited

Not that I use WordPress, or SASS, or BEM, or write class names based on how I want an element styled, but I'd say that a coding standards guide is just that - a guide. The primary objective there is to deliver some consistency. If you want to follow a different standard, that's fine. It doesn't make the WordPress guide wrong.

On the other hand, "Refrain from using over-qualified selectors" is sound advice, the purpose of which is to avoid specificity wars. If you don't follow that, you will need your own strategy to avoid them.

Collapse
 
nickyoung profile image
Nick Young • Edited

That's a good point. I guess I think it would be important if this is something that a new WP developer comes across and feels like they shouldn't start developing because of it. It could turn away some that think they have to write code like this to make it into the various repos or something.

I so agree with the overqualified CSS selectors bit - thay was kind of a heat of the moment thing. I still do think we tend to be more careless of that rule though when using something like sass since everything starts getting nested real quick.

Thanks for your comment!