Wordpress - Are the WordPress Core CSS styles really all nessesary?
The most definitive and up to date answer about best practice can come probably only from the wordpress.org theme review team, and right now they are different from the codex. just quoting it here, but I'm sure it might change with time
Themes are required to support the following WordPress-defined CSS classes, or similar elements:
Alignment Classes: .aligncenter .alignleft .alignright Caption Related Classes: .wp-caption .wp-caption-text .gallery-caption Post Classes: .sticky Comment Classes: .bypostauthor
While needing to be present in the stylesheet, .sticky and .bypostauthor can remain empty (unstyled) if desired. The intent is simply to ensure that theme developers have considered all classes generated by WordPress
By this it doesn't look like you have to have all the CSS rules that are listed in the codex page you pointed to.
The align*
and caption
classes are generated by WordPress in shortcodes and image functions. You should use those in your stylesheet.
Of course, the Codex text is just an example.
.aligncenter,
div.aligncenter
… is a very poor selector. Slower and more redundant than necessary.
Also, the class names are not semantic meaningful: in a right-to-left output (Arabic) you may use …
.alignright {
float: left;
}
But that is not easy to change and probably not worth the effort. So … live with it. :)