Intent to Prototype: CSS font-palette property animation

135 views
Skip to first unread message

Munira Tursunova

unread,
Mar 20, 2023, 4:58:07 AM3/20/23
to blin...@chromium.org

Contact emails

moo...@google.com, dr...@google.com


Explainer

https://docs.google.com/document/d/1XMTrKH003KBOes6hxzI-3E7LTwp5YwFC-rnzoFpFrfw/edit?usp=sharing


Specification

Will be written as a part of the implementation.


Summary

The CSS font-palette property allows selection of a specific palette used to render a font. The CSS Fonts 4 spec defines the animation behavior of this property as discrete, which is insufficient to achieve a smooth transition between two selected palettes. Creating the smooth transition between the palettes is rather difficult to achieve if the property is not interpolatable, web authors would need to manually compute the value for each frame in order to achieve that.


Blink component

Blink>Fonts


Motivation

Color fonts have vastly improved typographic expressiveness on the web. They provide web authors with a variety of new features, like defining the palette of the font, that will allow them to style glyph appearance flexibly, on top of what’s pre-defined by the font. Currently the animation type of the font-palette property is discrete, meaning that there is no smooth transition between the different color values of the font. The only way to animate the font-palette property smoothly is by doing it manually, which is rather complicated: in order for animation to work, web authors need to retrieve information about color records from the font and compute font-palette values for each frame. 


Defining animation behavior for the CSS font-palette property solves this by enabling a declarative CSS way of achieving a smooth transition. This feature will provide web authors with an easy way to have a smooth transition between font-palette values.


Initial public proposal

We plan to raise this as an issue for the CSS Fonts spec in the CSS WG once we gain more insights from prototyping. 


Search tags

font-palette, animation, transition, font-palette-values, color fonts


TAG review



TAG review status

Pending


Risks



Interoperability and Compatibility



Gecko: No signal


WebKit: No signal

Probably positive, since they implemented color fonts, font-palette


Web developers: Positive

Ollie Williams expressed his interest in this CSS Tricks post, describing it as a dream if that feature was real.

Scott Kellum (of typetura.com) has also been suggesting it as a useful feature for the web (origin: a Twitter thread and email conversation, the original twitter post was deleted).


Other signals:


WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None expected



Debuggability



Is this feature fully tested by web-platform-tests?

Not yet, but tests will be written as part of the implementation.


Flag name



Requires code in //chrome?

False


Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1400620


Estimated milestones

No milestones specified



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5177171439517696


Yoav Weiss

unread,
Mar 20, 2023, 5:14:01 AM3/20/23
to Munira Tursunova, blin...@chromium.org
Thanks for working on less-blinky color transitions for fonts! :)

Let's not assume their position, but file to ask for it when the time is right.
 

Web developers: Positive

Ollie Williams expressed his interest in this CSS Tricks post, describing it as a dream if that feature was real.

Scott Kellum (of typetura.com) has also been suggesting it as a useful feature for the web (origin: a Twitter thread and email conversation, the original twitter post was deleted).


Other signals:


WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None expected



Debuggability



Is this feature fully tested by web-platform-tests?

Not yet, but tests will be written as part of the implementation.


Flag name



Requires code in //chrome?

False


Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1400620


Estimated milestones

No milestones specified



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5177171439517696


--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAAO7W_DFvgY9yqz_Tr%2B2sHMwsydbWMQ66yZWwF7ZoxDZ2yE1QA%40mail.gmail.com.

Philip Jägenstedt

unread,
Mar 20, 2023, 6:22:50 AM3/20/23
to Yoav Weiss, Munira Tursunova, blin...@chromium.org
Hi Munira,

Do you think this will require any changes to DevTools for debuggability? There's a checklist at https://goo.gle/devtools-checklist, where the key question is "how would a web developer making use of your new WPF test and debug their code?"

Best regards,
Philip

Reply all
Reply to author
Forward
0 new messages