Intent to implement and ship the text-size-adjust property

215 views
Skip to first unread message

Philip Rogers

unread,
Jun 24, 2016, 4:13:23 PM6/24/16
to blink-dev

Contact emails

p...@chromium.org


Spec

https://drafts.csswg.org/css-size-adjust

https://compat.spec.whatwg.org/#css-prefixed-aliases


Summary

Implement & ship the {-webkit-}text-size-adjust CSS property for disabling text autosizing.


Motivation

Text autosizing (or "font boosting") is the mobile-specific feature that increases font size to make desktop pages readable without panning. Text autosizing usually does not affect pages designed for mobile, although it can depending on the device. Open http://output.jsbin.com/qujile on Android for an example of text autosizing.


{-webkit-}text-size-adjust will let authors disable the text autosizing feature.


https://crbug.com/532408 is an example of the difficulty text autosizing causes. The author of a text editor widget does not control the pages they are embedded on (i.e., cannot know if the page is designed for mobile) and autosizing breaks precise text positioning. https://crbug.com/135808 and https://crbug.com/233056#c5 are similar bugs, and there are many more.


Interoperability and Compatibility Risk

WebKit (-webkit-), Gecko (-moz-), and Edge (-ms-) all have basic support for text-size-adjust. In the HTTPArchive data of ~18 million urls, 2.62% contain text-size-adjust. Chromium previously supported -webkit-text-size-adjust but it was removed, likely by accident [1].


The unprefixed version of the property is rare (0.19% of HTTPArchive) which is why this proposal is for adding both the prefixed and unprefixed versions. The prefixed property has become the de-facto standard.


The initial goal is to match WebKit's implementation and use data from that to inform interoperable spec changes. The spec currently differs from all implementations, though basic disabling of autosizing is interoperable.


Ongoing technical constraints

None


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

No. Text autosizing is only supported on Android and Android WebView so this property will only affect those platforms (though it will be implemented for all platforms).


OWP launch tracking bug

https://crbug.com/623158


Link to entry on the feature dashboard

https://www.chromestatus.com/features/5730156303876096


Requesting approval to ship?

Yes



[1] Why was -webkit-text-size-adjust removed from Chromium?

Chromium supported -webkit-text-size-adjust but the property was removed from WebKit when it was pushed downstream to Safari's internal iOS repo in http://trac.webkit.org/changeset/145168. The property was re-upstreamed a few months later in http://trac.webkit.org/changeset/155496. Between removing it and re-adding it, Blink forked. Bugs were filed (https://crbug.com/233056#c5) but the implications were not understood.

Steve Kobes

unread,
Jun 24, 2016, 7:14:41 PM6/24/16
to Philip Rogers, blink-dev
non-owner LGTM :)

Rick Byers

unread,
Jun 24, 2016, 8:00:38 PM6/24/16
to Steve Kobes, Philip Rogers, blink-dev
LGTM1

Kinda sad we had this regression but didn't notice.  I'm glad we're MUCH better about bug triage now :-)
I filed this issue to suggest that the -webkit alias be moved from the compat space into the proper spec.

Dimitri Glazkov

unread,
Jun 24, 2016, 8:01:30 PM6/24/16
to Rick Byers, Steve Kobes, Philip Rogers, blink-dev
LGTM2

:DG<

Dominik Röttsches

unread,
Jun 27, 2016, 10:54:23 AM6/27/16
to blink-dev
Not to be confused with https://drafts.csswg.org/css-fonts-3/#propdef-font-size-adjust ... LGTM too, although I wish the spec process would have avoided the confusing naming.


LGTM2

:DG<
--
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.

Chris Harrelson

unread,
Jun 28, 2016, 12:42:32 PM6/28/16
to Dominik Röttsches, blink-dev
LGTM3
Reply all
Reply to author
Forward
0 new messages