Intent to Ship: Update the syntax of `text-wrap` to match the new spec

201 views
Skip to first unread message

Koji Ishii

unread,
Aug 20, 2024, 12:59:31 AMAug 20
to blink-dev

Contact emails

ko...@chromium.org

Explainer

None

Specification

https://drafts.csswg.org/css-text-4/#text-wrap-shorthand

Design docs


https://docs.google.com/document/d/1Xl3J1WCg--fUm1-FX5gHbJIIC0szNwulQV7nW4n6_aY/edit?usp=sharing

Summary

Updates the CSS syntax for the CSS white-space and text-wrap properties to match the spec and other browsers. Blink changed the CSS white-space property in crbug.com/40257360, shipped in M114. The CSS white-space and text-wrap properties have changed since then, and other browsers are shipping the new behavior. This feature makes Blink match the new spec and other browsers.



Blink component

Blink>Layout>Inline

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility

None



Gecko: Shipped/Shipping

WebKit: Shipped/Shipping (https://bugs.webkit.org/show_bug.cgi?id=249840)

Web developers: Positive

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



Debuggability

None



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

Yes

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

Yes

https://wpt.fyi/results/css/css-text/parsing?label=experimental&label=master&aligned&view=interop&q=label%3Ainterop-2024-text-wrap



Flag name on chrome://flags

None

Finch feature name

None

Non-finch justification

None

Requires code in //chrome?

False

Estimated milestones

Shipping on desktop130
Shipping on Android130
Shipping on WebView130


Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).

None

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5793719555719168?gate=4921803110350848

Links to previous Intent discussions

Intent to Prototype: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAHe_1dL3Mj5%2Bkq0T25Kd49RkU1zQMqNe1X1%3DvbxbemJ_SAhaow%40mail.gmail.com


This intent message was generated by Chrome Platform Status.

Domenic Denicola

unread,
Aug 20, 2024, 1:06:44 AMAug 20
to Koji Ishii, blink-dev
On Tue, Aug 20, 2024 at 1:59 PM Koji Ishii <ko...@chromium.org> wrote:

Contact emails

ko...@chromium.org

Explainer

None

Specification

https://drafts.csswg.org/css-text-4/#text-wrap-shorthand

Design docs


https://docs.google.com/document/d/1Xl3J1WCg--fUm1-FX5gHbJIIC0szNwulQV7nW4n6_aY/edit?usp=sharing

Summary

Updates the CSS syntax for the CSS white-space and text-wrap properties to match the spec and other browsers. Blink changed the CSS white-space property in crbug.com/40257360, shipped in M114. The CSS white-space and text-wrap properties have changed since then, and other browsers are shipping the new behavior. This feature makes Blink match the new spec and other browsers.



Blink component

Blink>Layout>Inline

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility

None


Will there be any compatibility issues, i.e. code that means something different before and after the change?
 


Gecko: Shipped/Shipping

WebKit: Shipped/Shipping (https://bugs.webkit.org/show_bug.cgi?id=249840)

Web developers: Positive

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



Debuggability

None



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

Yes

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

Yes

https://wpt.fyi/results/css/css-text/parsing?label=experimental&label=master&aligned&view=interop&q=label%3Ainterop-2024-text-wrap



Flag name on chrome://flags

None

Finch feature name

None

Non-finch justification

None

Please provide either a Finch feature name or a non-Finch justification.
 


Requires code in //chrome?

False

Estimated milestones

Shipping on desktop130
Shipping on Android130
Shipping on WebView130


Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).

None

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5793719555719168?gate=4921803110350848

Links to previous Intent discussions

Intent to Prototype: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAHe_1dL3Mj5%2Bkq0T25Kd49RkU1zQMqNe1X1%3DvbxbemJ_SAhaow%40mail.gmail.com


This intent message was generated by Chrome Platform Status.

--
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/CAHe_1dLqVwf839yLgTK6UEeiP4409KhuWohH0idJXOOxZDu7dg%40mail.gmail.com.

Koji Ishii

unread,
Aug 20, 2024, 3:05:14 AMAug 20
to Domenic Denicola, blink-dev
Thank you for pointing this out, Demenic.

Will there be any compatibility issues, i.e. code that means something different before and after the change?

You're right, there will be. The `balance` and `pretty` are valid for the `text-wrap` property, before or after this change, but they are no longer valid values for the `white-space` property.

The risk is considered low for the reasons below:
  1. It's more common to use the `text-wrap` property for these values than to use the `white-space` property, as articles such as https://developer.chrome.com/docs/css-ui/css-text-wrap-balance suggest using the `text-wrap` property.
  2. Gecko and WebKit didn't ship the old spec behavior, and thus they never supported these values for the `white-space` property.
  3. When there were breaks, at worst, balancing or the Knuth-Plass algorithm don't apply, but the text is still readable in reasonably good layout.
Updated the chromestatus entry with this text.

2024年8月20日(火) 14:06 Domenic Denicola <dom...@chromium.org>:

Alex Russell

unread,
Aug 21, 2024, 11:52:08 AMAug 21
to blink-dev, Koji Ishii, blink-dev, Domenic Denicola
LGTM1

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Mike Taylor

unread,
Aug 21, 2024, 11:52:40 AMAug 21
to Alex Russell, blink-dev, Koji Ishii, Domenic Denicola

LGTM2

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/f90074a8-71e0-4f8f-af5c-8178d41144a1n%40chromium.org.

Daniel Bratell

unread,
Aug 21, 2024, 11:53:24 AMAug 21
to Mike Taylor, Alex Russell, blink-dev, Koji Ishii, Domenic Denicola
Reply all
Reply to author
Forward
0 new messages