clip-text-multi-line.html (1215B)
1 <!DOCTYPE html> 2 3 <meta charset="UTF-8"> 4 5 <title>CSS Backgrounds Test: 'background-clip: text' and painting of multi-line text</title> 6 7 <!-- 8 9 Inspired by 10 11 http://wpt.live/css/css-backgrounds/background-clip/clip-text-multi-line.html 12 13 For more info, see 14 15 https://github.com/web-platform-tests/wpt/pull/30812#issuecomment-1314514987 16 17 --> 18 19 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> 20 <link rel="author" href="mailto:mmaxfield@apple.com" title="Myles C. Maxfield"> 21 <link rel="help" href="https://drafts.csswg.org/css-backgrounds-4/#valdef-background-clip-text"> 22 <link rel="match" href="clip-text-multi-line-ref.html"> 23 <link rel="stylesheet" href="/fonts/ahem.css"> 24 <meta name="fuzzy" content="maxDifference=0-1; totalPixels=0-5846" /> 25 <style> 26 div 27 { 28 background-clip: text; 29 background-color: red; 30 background-image: linear-gradient(green, green); 31 color: transparent; 32 font-family: Ahem; 33 font-size: 30px; 34 line-height: 1.5; 35 } 36 </style> 37 38 <p>Test passes if there are 2 green stripes and if the top stripe is half the width of the bottom stripe. 39 40 <div>12345<br>1234567890</div>