WPTT / WPThemeReview

PHP_CodeSniffer rules (sniffs) to enforce WordPress theme review coding conventions
MIT License
208 stars 38 forks source link

Can we check for core CSS classes being defined? #135

Closed joyously closed 6 years ago

joyously commented 7 years ago

There is not an explicit Review Guideline for this, but all themes need to style the core defined CSS classes. A lot of themes either leave them out or put empty rules for them.

This codex page mentions the core classes wp-caption, alignright, alignleft, aligncenter, alignnone, screen-reader-text but does not mention sticky, gallery-caption, bypostauthor, which are considered optional (?).

grappler commented 7 years ago

Here are a list of classes that the previous theme check checked for https://github.com/WordPress/theme-check/blob/master/checks/style_needed.php

joyously commented 7 years ago

That's good, but I think it's why I was seeing them defined empty.

jrfnl commented 6 years ago

Closing as this can't be reliably checked by PHPCS.