content-type-001

text/css content type

WeasyPrint

This browser

Assertion
A stylesheet sent as text/plain should not be interpreted by user agents as CSS. It should instead be ignored.

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3 
 4  <head>
 5  
 6   <title>CSS Test: text/css content type</title>
 7   
 8   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
 9   <link rel="author" title="Daniel Schattenkirchner" href="crazy-daniel{at}gmx.de">
10   <link rel="help" href="http://www.w3.org/TR/CSS21/conform.html#text-css">
11   <meta content="" name="flags">
12   <meta content="A stylesheet sent as text/plain should not be interpreted by user agents as CSS. It should instead be ignored." name="assert">
13 
14   <style type="text/css">
15   div
16   {
17   background-color: lime;
18   font-size: 2em;
19   }
20   </style>
21 
22   <link href="support/plaintext-css.txt" rel="stylesheet" type="text/css">
23 
24  </head>
25 
26  <body>
27 
28   <p>Test passes if the background of the text sample is bright green. There should be <strong>no red</strong>.</p>
29 
30   <div>Text sample</div>
31 
32  </body>
33 </html>