W3C home > Mailing lists > Public > www-style@w3.org > July 2004

Re: [CSS21] Test Suite

From: Lachlan Hunt <lachlan.hunt@iinet.net.au>
Date: Fri, 23 Jul 2004 17:05:26 +1000
Message-ID: <4100B8B6.90006@iinet.net.au>
To: Thomas Scholz <info@scholz-webdesign.de>
Cc: www-style@w3.org

Thomas Scholz wrote:
> Better than testing with »color« were »display«: Hide »PASS« for  
> non-compliant browsers and »FAIL« for compliant browsers. That's always 
> my  preferred method, e.g. on  
> <http://scholz-webdesign.de/css/test/identitaetskrise/>.

   It would seem that if user agents were to follow the rules about 
content-type headers, when the your stylesheet is requested, it should 
reject it and not parse it as css because it was served as text/html. 
Here's the relevant request and response headers for your stylesheet 
(which is the same as the HTML file):

GET /css/test/identitaetskrise/ HTTP/1.1
Host: scholz-webdesign.de
Accept: text/css,*/*;q=0.1

HTTP/1.x 200 OK
Content-Type: text/html; charset=utf-8  ← CSS served as text/html here!

   Therefore any useragent that applies 'display:none' to the strong 
element in your test, has failed because it parsed an HTML file as CSS. 
  I believe the prefered method of including styles is to either include 
them within a <style> element, or link to an external style sheet, that 
is actually a seperate CSS file.

Lachlan Hunt

Received on Friday, 23 July 2004 03:08:04 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:14 UTC