Intent to Implement and Ship: The “system-ui” generic font family

440 views
Skip to first unread message

Koji Ishii

unread,
Oct 11, 2016, 2:34:56 AM10/11/16
to blink-dev

Contact emails

ko...@chromium.org


Spec

CSS Fonts Level 4, 10. New generic font families

https://drafts.csswg.org/css-fonts-4/#valdef-font-family-system-ui


Summary

This generic font family allows authors to style contents so it fits within the system UI.


Motivation

The web does this today either by listing all known system family in their CSS, or by relying on vendor-specific extensions. This new generic font family allows the standardized way to use the system font, on all platforms Blink supports.

The original CSS WG discussion proposed by Apple is here.


Interoperability and Compatibility Risk

Low.

  • Blink on Mac already ships this functionality as non-standard “BlinkMacSystemFont”. Shipping “system-ui” means to use the standardized name and support other platforms. Old name will be kept as an alias on Mac, and its usage will be measured for the deprecation.

  • CSS.supports() cannot detect font families, and doing so has privacy concerns, but font fallback allows authors to write robust CSS.

  • Further risk is considered to be low.

Web developers: Positive.

WebKit: Shipped “-apple-system”, has a bug to alias to “system-ui”.

Gecko: Positive (tracking bug). Shipped “-apple-system” for the compat with WebKit.

Edge: No public signals.


Ongoing technical constraints

None.


Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes.


OWP launch tracking bug

https://crbug.com/654679


Link to entry on the feature dashboard

https://www.chromestatus.com/feature/5640395337760768


Requesting approval to ship?

Yes.


Philip Jägenstedt

unread,
Oct 11, 2016, 6:14:13 AM10/11/16
to Koji Ishii, blink-dev
Does CSS.supports() and @supports deliberately make detection not work for font families? Would there really be any privacy concern in allowing support for an alias like this to be detected? It seems about as harmless as CSS.supports('font-family: sans-serif').

Koji Ishii

unread,
Oct 11, 2016, 6:41:44 AM10/11/16
to Philip Jägenstedt, Koji Ishii, blink-dev
As far as I understand, detecting generic font families should be ok.

For non-generic font families, authors should use font cascading lists rather than try to detect. When author should use cascading lists for non-generic font families, and when it works equally well for generic font families too, I think there's little-to-no needs to make it detectable.

As far as I know, there were no such requests to CSSWG in the past, but if there were any good use cases that cascading lists cannot solve, I think it's great to discuss at WG. When WG agrees to add, I'm happy to consider adding it to Blink.

/koji

Philip Jägenstedt

unread,
Oct 11, 2016, 9:11:08 AM10/11/16
to Koji Ishii, blink-dev
I've filed https://github.com/w3c/csswg-drafts/issues/590, can you see if I got the right spec(s)?

It seems a bit unlikely that this would be resolved quickly enough that all engines would support it when first shipping support for "system-ui", so it would not be entirely reliable reliable. LGTM1 to ship just the alias first.

Koji Ishii

unread,
Oct 11, 2016, 9:57:41 AM10/11/16
to Philip Jägenstedt, Koji Ishii, blink-dev
Thank you for filing the issue, and for your approval to ship. I think the spec labeling is correct, let's see how WG discussion would go.

/koji

Rick Byers

unread,
Oct 11, 2016, 10:36:30 AM10/11/16
to Koji Ishii, Philip Jägenstedt, blink-dev
LGTM2

Chris Harrelson

unread,
Oct 11, 2016, 12:23:01 PM10/11/16
to Rick Byers, Koji Ishii, Philip Jägenstedt, blink-dev
LGTM3

LGTM2
--
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+unsubscribe@chromium.org.

Reply all
Reply to author
Forward
0 new messages