[Pmwiki-users] (:noleft:) layout questions

Patrick R. Michaud pmichaud
Wed Dec 29 10:45:35 CST 2004

On Wed, Dec 29, 2004 at 12:17:08PM -0500, Tom Holroyd wrote:
> >         $HTMLStylesFmt['norm'] = "@import url(\$SkinDirUrl/myskin.css);\n";
> > 
> > Entries in $HTMLStylesFmt[] are automatically placed into the header
> > inside of <style ...> ... </style> tags.
> Hmm.  It also puts them inside comments. <!-- -->  Older Mozilla 
> builds wind up ignoring @import inside comments, but newer ones 
> seem not to mind.
> <whine>Why are there so many ways!?  Which one is right?</whine>
> Seriously (as in, the opposite of jokingly; it's not like this is 
> a serious issue), why the comments?

>From the HTML 4.01 specification [1]:

    14.5 Hiding style data from user agents

    Some style sheet languages support syntax intended to allow 
    authors to hide the content of STYLE elements from 
    non-conforming user agents.

    This example illustrates for CSS how to comment out the 
    content of STYLE elements to ensure that older, non-conforming 
    user agents will not render them as text.

    <STYLE type="text/css">
       H1 { color: red }
       P  { color: blue}

Most articles/reports I've seen on authoring CSS have indicated that it's
good practice to enclose the contents of <style> elements in comments.
If newer practices indicate that it would be better to *not* do this,
then I'll be glad to take a look at them and reconsider PmWiki's default.  :-)


1. http://www.w3.org/TR/html4/present/styles.html#h-14.5

More information about the pmwiki-users mailing list