font-palette-29-ref.html (1112B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>Tests for font-palette and @font-palette-values</title> 6 <link rel="help" href="https://drafts.csswg.org/css-fonts/#font-palette-prop"> 7 <link rel="help" href="https://drafts.csswg.org/css-fonts-4/#font-palette-values"> 8 <link rel="author" title="Myles C. Maxfield" href="mailto:mmaxfield@apple.com"> 9 <style> 10 @font-face { 11 font-family: "COLR-test-font"; 12 src: url("resources/COLR-palettes-test-font.ttf") format("truetype"); 13 } 14 15 @font-face { 16 font-family: "COLR-test-font-no-light-dark"; 17 src: url("resources/COLR-palettes-test-font-no-light-dark.ttf") format("truetype"); 18 } 19 20 @font-palette-values --MyPalette1 { 21 font-family: "COLR-test-font"; 22 base-palette: 3; 23 } 24 25 @font-palette-values --MyPalette2 { 26 font-family: "COLR-test-font-no-light-dark"; 27 base-palette: 1; 28 } 29 </style> 30 </head> 31 <body> 32 <div id="target" style="font-size: 48px;"><span style="font-family: 'COLR-test-font'; font-palette: --MyPalette1;">A</span><span style="font-family: 'COLR-test-font-no-light-dark'; font-palette: --MyPalette2;">A</span></div> 33 </body> 34 </html>