[wp-hackers] Styling of "post date"

Allan Mertner amwp at mertner.com
Sun Sep 12 00:23:17 UTC 2004


>My first example should have been 
>
>#content>h2 { color:red;}
>
>and then you don't need to do anything for h2s within your posts. 
>  
>
I still think it would be appropriate to use a class tag to separate the 
style from the fact that it currently is an h2 tag. I certainly don't 
see that it's a *problem* to add 15 bytes to index.php to make this 
clearer in both the code and the stylesheet.  Even your method will 
still work afterwards!

The w3c has an article that discusses this kind of thing and why it's a 
good idea to use class names. It's here: 
http://www.w3.org/QA/Tips/goodclassnames

>Matt's point is valid though that logically you would probably want to
>use h3 or even h4 of your story title is h3 (mine are)
>  
>
Sure, I do that.  I just like my stylesheet to be somewhat readable so I 
added class="postdate" to the h2 tag, to indicate that it's not just any 
header but a header containing the post date, just like the W3C 
recommends :).

Are you the one who decides whether the change goes into WP or not? If 
not, who does?

Thanks,
Allan





More information about the hackers mailing list