[wp-testers] CSS in WYSIWYG
Dougal Campbell
dougal at gunters.org
Fri Dec 9 18:11:58 GMT 2005
Andy Staines wrote:
> Is there a case for including in the core a VERY SMALL set of CSS defs?
> Like alignleft/alignright... Not keen on the idea but it would work for
> a large number of people
Names like "alignleft" and "alignright" are presentational in nature. I
know I've seen a good article on this subject, but I can't seem to
locate the one I had in mind. However, here are a couple of links that
touch on the topic:
http://tantek.com/log/2002/12.html#L20021216t2238
http://meyerweb.com/?s=presentational
It's a good idea to first try to target HTML elements by their hierarchy
in the document. Add classes when you have exceptions, but make them
semantic by their function, not by how you intend to display them. What
if you redesign your site later in such a way that all the "alignright"
items aren't supposed to be aligned to the right anymore?
Of course, this is pretty general advice, and anybody is free to do
things their own way. But I don't think that we should add generic
classes to WP's default CSS, especially if they are presentational in
nature. For one thing, it's bad semantics. And for another, there's no
guarantee that other CSS rules defined by a theme or plugin wouldn't
interact with them, causing unwanted side-effects.
--
Dougal Campbell <dougal at gunters.org>
http://dougal.gunters.org/
More information about the wp-testers
mailing list