W3C home > Mailing lists > Public > html-tidy@w3.org > July to September 2000

how tidy8jul00 treats STYLE blocks

From: Sebastian Lange <lange@cyperfection.de>
Date: Thu, 13 Jul 2000 14:00:45 +0200
Message-Id: <4.3.2.7.2.20000713133957.00b61f88@pop3.cyperfection.de>
To: html-tidy@w3.org
When I use the --clean "yes" option, tidy turns presentional markup into 
appropriate style rules and places them into a <STYLE></STYLE> block in the 
document head.

However, if there is already one STYLE block in the original file, tidy 
does NOT add its generated style rules to that block, but adds its own 
block to the document head. Is this behaviour desired?

Moreover, if there are several STYLE blocks throughout the document, Tidy 
moves them all to the document head, but does not concatenate them into one 
block.

Also, it does not insert comment tags into its generated block (to hide the 
style block content from older browsers).


In other words: A generated block should look like this:

><STYLE TYPE="text/css">
><!--
>     .c1 {text-align: center;}
>-->
></STYLE>

rather than:

><STYLE TYPE="text/css">
>  div.c1 {text-align: center}
></STYLE>

(I also think that it should be simply ".c1" instead of "div.c1", as this 
would make it easier for the beforementioned recursive directory tidying 
and extracting style blocks into an external CSS document.)


Comments? Questions?
--
Sebastian Lange
http://www.sl-chat.de/
Maybe the first chat site that validates as HTML
4.0 even though user input may contain HTML codes.

Courtesy to Dave Raggett's HTML Tidy:
http://www.w3.org/People/Raggett/tidy/
Received on Thursday, 13 July 2000 08:13:41 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:44 GMT