Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Intent to Ship: CSS text-box, text-box-trim and text-box-edge

641 views
Skip to first unread message

Koji Ishii

unread,
Dec 11, 2024, 11:49:43 AM12/11/24
to blink-dev, Lingqi Chi, Ian Kilpatrick, Kent Tamura

Contact emails

lin...@chromium.orgko...@chromium.org

Explainer

None

Specification

https://drafts.csswg.org/css-inline-3/#text-edges

Summary

To achieve optical balance of text content, the text-box-trim and text-box-edge properties, along with the text-box shorthand property, make finer control of vertical alignment of text possible. The text-box-trim property specifies the sides to trim, above or below, and the text-box-edge property specifies how the edge should be trimmed. These properties allow developers to control vertical spacing precisely by using the font metrics. Note that the `ideographic` and `ideographic-ink`, two values for the text-box-edge property for CJK, are deferred to future releases due to open issues currently under discussion.



Blink component

Blink>Layout>Inline

TAG review

https://github.com/w3ctag/design-reviews/issues/1021


TAG review status

Pending

Risks



Interoperability and Compatibility

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?

No.



Debuggability



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-inline/text-box-trim?label=experimental&label=master&aligned



Flag name on about://flags

text-box-trim

Finch feature name

CSSTextBoxTrim

Requires code in //chrome?

False

Tracking bug

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

Estimated milestones

Shipping on desktop133
DevTrial on desktop128
Shipping on Android133
DevTrial on Android128
Shipping on WebView133


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/5174589850648576?gate=5185376392577024

Links to previous Intent discussions

Intent to Prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/Sn8TF5KHrRU


This intent message was generated by Chrome Platform Status.

Mike Taylor

unread,
Dec 18, 2024, 10:29:51 AM12/18/24
to Koji Ishii, blink-dev, Lingqi Chi, Ian Kilpatrick, Kent Tamura

LGTM1

--
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 visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAHe_1d%2BK92_9kSvObCgk-ShO6iWyvXyvvzR3%2BT9Bh4Wp0u0z1A%40mail.gmail.com.

Yoav Weiss (@Shopify)

unread,
Dec 18, 2024, 10:34:18 AM12/18/24
to blink-dev, Mike Taylor, Lingqi Chi, Ian Kilpatrick, Kent Tamura, Koji Ishii
LGTM2

On Wednesday, December 18, 2024 at 4:29:51 PM UTC+1 Mike Taylor wrote:

LGTM1

On 12/11/24 11:49 AM, Koji Ishii wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Daniel Bratell

unread,
Dec 18, 2024, 10:39:47 AM12/18/24
to Yoav Weiss (@Shopify), blink-dev, Mike Taylor, Lingqi Chi, Ian Kilpatrick, Kent Tamura, Koji Ishii

The spec you link has a red note saying:

"This is an early draft of a proposal, and might change significantly as design critiques and use cases are registered and various details and interactions with other properties are worked out. Do not ship (yet)."

Does that only apply to the properties you listed?

/Daniel

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/95c3fb72-c1e2-4b59-9e92-bfb48df74aadn%40chromium.org.

Mike Taylor

unread,
Dec 18, 2024, 10:55:30 AM12/18/24
to Daniel Bratell, Yoav Weiss (@Shopify), blink-dev, Lingqi Chi, Ian Kilpatrick, Kent Tamura, Koji Ishii

I had the same question (as it was noted in the WebKit position), but found https://github.com/w3c/csswg-drafts/commit/3b15a485b2f9dfaa8e9ad3958ec2625d7857f719. I assume this I2S means we agree. :)

Daniel Bratell

unread,
Dec 18, 2024, 11:00:47 AM12/18/24
to Mike Taylor, Yoav Weiss (@Shopify), blink-dev, Lingqi Chi, Ian Kilpatrick, Kent Tamura, Koji Ishii

Ok, so let's go!

LGTM3

/Daniel

Koji Ishii

unread,
Dec 19, 2024, 4:39:11 AM12/19/24
to Daniel Bratell, Mike Taylor, Yoav Weiss (@Shopify), blink-dev, Lingqi Chi, Ian Kilpatrick, Kent Tamura
Thank you for checking this:
 
The spec you link has a red note saying:

"This is an early draft of a proposal, and might change significantly as design critiques and use cases are registered and various details and interactions with other properties are worked out. Do not ship (yet)."

Does that only apply to the properties you listed?

That's a left over, one removed as Mike pointed out but one still left. I'll check with the editor.


2024年12月19日(木) 1:00 Daniel Bratell <brat...@gmail.com>:

Ok, so let's go!

LGTM3

/Daniel

On 2024-12-18 16:55, Mike Taylor wrote:

I had the same question (as it was noted in the WebKit position), but found https://github.com/w3c/csswg-drafts/commit/3b15a485b2f9dfaa8e9ad3958ec2625d7857f719. I assume this I2S means we agree. :)

On 12/18/24 10:39 AM, Daniel Bratell wrote:

The spec you link has a red note saying:

"This is an early draft of a proposal, and might change significantly as design critiques and use cases are registered and various details and interactions with other properties are worked out. Do not ship (yet)."

Does that only apply to the properties you listed?

/Daniel

On 2024-12-18 16:34, Yoav Weiss (@Shopify) wrote:
LGTM2

On Wednesday, December 18, 2024 at 4:29:51 PM UTC+1 Mike Taylor wrote:

LGTM1

On 12/11/24 11:49 AM, Koji Ishii wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAHe_1d%2BK92_9kSvObCgk-ShO6iWyvXyvvzR3%2BT9Bh4Wp0u0z1A%40mail.gmail.com.

David Baron

unread,
Dec 19, 2024, 10:45:12 AM12/19/24
to Koji Ishii, Daniel Bratell, Mike Taylor, Yoav Weiss (@Shopify), blink-dev, Lingqi Chi, Ian Kilpatrick, Kent Tamura
I'm a little concerned that the discussion in https://github.com/w3c/csswg-drafts/issues/10834 may lead to some changes; I think it's at least worth monitoring that issue over the next few weeks to see what happens there.

-David

Mike Taylor

unread,
Dec 20, 2024, 9:46:04 AM12/20/24
to David Baron, Koji Ishii, Daniel Bratell, Yoav Weiss (@Shopify), blink-dev, Lingqi Chi, Ian Kilpatrick, Kent Tamura

Thanks David for flagging.

Can we hold off on shipping until the issue settles?

Bramus

unread,
Jan 6, 2025, 3:51:26 AMJan 6
to blink-dev, Mike Taylor, Daniel Bratell, Yoav Weiss, blink-dev, Lingqi Chi, Ian Kilpatrick, Kent Tamura, David Baron, Koji Ishii
On Friday, December 20, 2024 at 3:46:04 PM UTC+1 Mike Taylor wrote:

Thanks David for flagging.

Can we hold off on shipping until the issue settles?

On 12/19/24 10:44 AM, David Baron wrote:
I'm a little concerned that the discussion in https://github.com/w3c/csswg-drafts/issues/10834 may lead to some changes; I think it's at least worth monitoring that issue over the next few weeks to see what happens there.
There’s also some ongoing discussion in https://github.com/WebKit/standards-positions/issues/432#issuecomment-2553396257 about text-box.

-David

On Thu, Dec 19, 2024 at 4:38 AM Koji Ishii <ko...@chromium.org> wrote:
Thank you for checking this:
 
The spec you link has a red note saying:

"This is an early draft of a proposal, and might change significantly as design critiques and use cases are registered and various details and interactions with other properties are worked out. Do not ship (yet)."

Does that only apply to the properties you listed?

That's a left over, one removed as Mike pointed out but one still left. I'll check with the editor.


2024年12月19日(木) 1:00 Daniel Bratell <brat...@gmail.com>:

Ok, so let's go!

LGTM3

/Daniel

On 2024-12-18 16:55, Mike Taylor wrote:

I had the same question (as it was noted in the WebKit position), but found https://github.com/w3c/csswg-drafts/commit/3b15a485b2f9dfaa8e9ad3958ec2625d7857f719. I assume this I2S means we agree. :)

On 12/18/24 10:39 AM, Daniel Bratell wrote:

The spec you link has a red note saying:

"This is an early draft of a proposal, and might change significantly as design critiques and use cases are registered and various details and interactions with other properties are worked out. Do not ship (yet)."

Does that only apply to the properties you listed?

/Daniel

On 2024-12-18 16:34, Yoav Weiss (@Shopify) wrote:
LGTM2

On Wednesday, December 18, 2024 at 4:29:51 PM UTC+1 Mike Taylor wrote:

LGTM1

On 12/11/24 11:49 AM, Koji Ishii wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
--
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.
--
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.

Koji Ishii

unread,
Jan 7, 2025, 2:18:20 AMJan 7
to Mike Taylor, David Baron, Daniel Bratell, Yoav Weiss (@Shopify), blink-dev, Lingqi Chi, Ian Kilpatrick, Kent Tamura
2024年12月20日(金) 23:45 Mike Taylor <mike...@chromium.org>:

Thanks David for flagging.

Can we hold off on shipping until the issue settles?

On 12/19/24 10:44 AM, David Baron wrote:
I'm a little concerned that the discussion in https://github.com/w3c/csswg-drafts/issues/10834 may lead to some changes; I think it's at least worth monitoring that issue over the next few weeks to see what happens there.
Thank you David, agree it's worth monitoring.

The issue is about when `line-fit-edge` is set to a non-initial value. We haven't started implementing this property yet (this I2S is only about `text-box-trim` and `text-box-edge`), so it doesn't cause any breaking changes for now. When we start `line-fit-edge` in the future, this issue needs to be resolved.

Koji Ishii

unread,
Jan 7, 2025, 2:25:31 AMJan 7
to Bramus, blink-dev, Mike Taylor, Daniel Bratell, Yoav Weiss, Lingqi Chi, Ian Kilpatrick, Kent Tamura, David Baron
2025年1月6日(月) 17:51 Bramus <bra...@chromium.org>:
There’s also some ongoing discussion in https://github.com/WebKit/standards-positions/issues/432#issuecomment-2553396257 about text-box.
Thank you Bramus, I'm monitoring it too.

Though the spec may change by this discussion, the current Blink implementation is the most restrictive; i.e., the discussion may change to accept currently invalid syntax, but it won't break existing valid syntax. I think it can be a follow up change.
Reply all
Reply to author
Forward
0 new messages