font-synthesis-small-caps-first-line.html (1075B)
1 <!DOCTYPE html> 2 <html lang="en"> 3 <meta charset="utf-8"/> 4 <title>CSS Test: font-synthesis-small-caps apply to ::first-line</title> 5 <link rel="match" href="font-synthesis-small-caps-first-line-ref.html"> 6 <link rel="help" href="https://www.w3.org/TR/css-fonts-3/#font-synthesis-small-caps"> 7 <meta name="assert" content="If ‘small-caps’ is not specified, user agents must not synthesize small caps faces"> 8 <!--Lato-Medium does not have small caps in the font--> 9 <style> 10 @font-face { 11 font-family: "Lato-Medium"; 12 src: url(/fonts/Lato-Medium.ttf); 13 } 14 @supports not (font-synthesis-small-caps: none) { 15 .test {color: red;} 16 } 17 .test { 18 font-family: "Lato-Medium"; 19 font-size: 3em; 20 } 21 p.nosynth::first-line { 22 font-variant: small-caps; 23 font-synthesis-small-caps: none; 24 } 25 </style> 26 27 <p>Test passes if the two lines below are identical (the first line is <em>not shown as small caps</em>), and there is no red.</p> 28 <section class="test"> 29 <p class="nosynth">Filler text<br>Filler text</p> 30 </section>