Re: [csswg-drafts] [css-fonts-4] [color fonts] Ability to choose palette and colors by predefined name

>  “if base-palette refers to a palette that doesn’t exist, then the @-rule is only valid if all 0-n colors are specified, where n is the number of colors in a palette for this font”

perhaps more robustly,

 “if base-palette refers to a palette that doesn’t exist, then unspecified palette index entries are set to currentColor”

or transparent or black or whatever. But filled with a default, rather then the new palette being discarded.

> Maybe when setting a custom palette not based on another, you could set base-palette: none or leave out base-palette altogether (where all colors could default to currentColor).

Omitting/setting to none would not then allow you to actually *use* the shiny new palette, in the `font-palette` property. So the 'Hot pink' in the example above is not irrelevant.

So how about: if the palette index is greater than the number of predefined palettes; or if the palette name does not match, then a new palette is created. Or to state it another way, `@font-palette-values` creates a palette which is initialized to currentColor, except if it is overriding an existing palette in which case it is initialized to the values from that matching palette. The explicitly specified palette index entries are applied.

-- 
GitHub Notification of comment by svgeesus
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1125#issuecomment-402359813 using your GitHub account

Received on Wednesday, 4 July 2018 04:30:02 UTC