font-palette-modify-2-ref.html (794B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>Tests that dynamically modifying font-palette causes the necessary rendering update</title> 6 <link rel="help" href="https://drafts.csswg.org/css-fonts/#font-palette-prop"> 7 <link rel="author" title="Myles C. Maxfield" href="mailto:mmaxfield@apple.com"> 8 <style> 9 @font-face { 10 font-family: "COLR-test-font"; 11 src: url("resources/COLR-palettes-test-font.ttf") format("truetype"); 12 } 13 14 @font-palette-values --MyPalette { 15 font-family: "COLR-test-font"; 16 base-palette: 1; 17 } 18 19 @font-palette-values --MyPalette2 { 20 font-family: "COLR-test-font"; 21 base-palette: 0; 22 override-colors: 1 #00FF00; 23 } 24 </style> 25 </head> 26 <body> 27 <div id="target" style="font: 48px 'COLR-test-font'; font-palette: --MyPalette2;">A</div> 28 </body> 29 </html>