tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

font-family-rule-004a.xht (4040B)


      1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      2 
      3 <html xmlns="http://www.w3.org/1999/xhtml">
      4 
      5  <head>
      6 
      7   <title>CSS Test: font-family - inherit as part of font-family name</title>
      8 
      9   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
     10   <link rel="author" title="John Daggett" href="mailto:jdaggett@mozilla.com" />
     11   <link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#font-family-prop" title="15.3 Font family: the 'font-family' property" />
     12   <link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-family-prop" title="3.1 Font family: the font-family property" />
     13   <link rel="bookmark" href="http://lists.w3.org/Archives/Public/www-style/2012May/0878.html" title="Re: [css2.1][css3-fonts] keywords in unquoted font family names" />
     14 
     15   <meta content="invalid" name="flags" />
     16   <meta content="This test verifies 9 font-family declarations with inherit and 2 font-family declarations with invalid identifiers." name="assert" />
     17 
     18   <style type="text/css"><![CDATA[
     19   p
     20   {
     21   font-size: 1.5em;
     22   font-family: serif;
     23   }
     24 
     25   span#verify1 {font-family: "CSSTest Verify";}
     26 
     27   div#verify {font-size: 1.5em;}
     28 
     29   div
     30   {
     31   font-size: 2.5em;
     32   line-height: 1.5;
     33   }
     34 
     35   /*
     36   Newest font-family syntax in CSS 2.1:
     37   Value:
     38   [[<family-name> | <generic-family>] [, [<family-name>| <generic-family>]]* ] | inherit
     39 
     40   Brackets ([ ]) are for grouping.
     41 
     42   A bar (|) separates two or more alternatives: exactly one of them must occur.
     43 
     44   An asterisk (*) indicates that the preceding type, word, or group occurs zero or more times.
     45 
     46   Section 1.4.2.1 Value
     47   http://www.w3.org/TR/CSS21/about.html#value-defs
     48   */
     49 
     50   div#firstTest {font-family: inherit, "CSSTest Fallback";}
     51   /* invalid: unquoted inherit is a reserved keyword and not a font-family name */
     52 
     53   div#secondTest {font-family: "CSSTest Fallback", inherit;}
     54   /* invalid: unquoted inherit is a reserved keyword and not a font-family name */
     55 
     56   div#thirdTest {font-family: inherit foo, "CSSTest Fallback";}
     57   /* valid in CSS 2.1: the 2 identifiers (inherit foo) form a font-family name */
     58 
     59   div#fourthTest {font-family: foo inherit, "CSSTest Fallback";}
     60   /* valid in CSS 2.1: the 2 identifiers (foo inherit) form a font-family name */
     61 
     62   div#fifthTest {font-family: \inherit foo, "CSSTest Fallback";}
     63   /* valid in CSS 2.1: the 2 identifiers (\inherit foo) form a font-family name */
     64 
     65   div#sixthTest {font-family: \foo inherit, "CSSTest Fallback";}
     66   /* valid in CSS 2.1: the 2 identifiers (\foo inherit) form a font-family name */
     67 
     68   div#seventhTest {font-family: "inherit" foo, "CSSTest Fallback";}
     69   /* invalid: it's either one string or 1+ identifiers */
     70 
     71   div#eighthTest {font-family: fooinherit, "CSSTest Fallback";}
     72   /* valid */
     73 
     74   div#ninthTest {font-family: inheritfoo, "CSSTest Fallback";}
     75   /* valid */
     76 
     77   div#tenthTest {font-family: --foo bar, "CSSTest Fallback";}
     78   /* invalid: an identifier can not start with 2 consecutive hyphens
     79   http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
     80   */
     81 
     82   div#eleventhTest {font-family: bar --foo, "CSSTest Fallback";}
     83   /* invalid: an identifier can not start with 2 consecutive hyphens
     84   http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
     85   */
     86 
     87   ]]></style>
     88 
     89  </head>
     90 
     91  <body>
     92 
     93   <p><a href="http://www.w3.org/Style/CSS/Test/Fonts/">Test fonts</a> must be installed for this test: <span id="verify1">FAIL</span></p>
     94 
     95   <div id="verify">User agent's default font must be set to be "CSSTest FamilyName": 5678</div>
     96 
     97   <p>Test passes if there are exactly eleven "PASS" words below:</p>
     98 
     99   <div id="firstTest">5678</div>
    100 
    101   <div id="secondTest">5678</div>
    102 
    103   <div id="thirdTest">1234</div>
    104 
    105   <div id="fourthTest">1234</div>
    106 
    107   <div id="fifthTest">1234</div>
    108 
    109   <div id="sixthTest">1234</div>
    110 
    111   <div id="seventhTest">5678</div>
    112 
    113   <div id="eighthTest">1234</div>
    114 
    115   <div id="ninthTest">1234</div>
    116 
    117   <div id="tenthTest">5678</div>
    118 
    119   <div id="eleventhTest">5678</div>
    120 
    121  </body>
    122 </html>