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