Skip to content

FF149 ExprFeat/Relnote: CSS text-box and longhand props#43468

Open
hamishwillee wants to merge 1 commit intomdn:mainfrom
hamishwillee:ff149_expr_css_text_box_style
Open

FF149 ExprFeat/Relnote: CSS text-box and longhand props#43468
hamishwillee wants to merge 1 commit intomdn:mainfrom
hamishwillee:ff149_expr_css_text_box_style

Conversation

@hamishwillee
Copy link
Collaborator

@hamishwillee hamishwillee commented Mar 17, 2026

FF149 adds support for the shorthand CSS property text-box , corresponding longhand properties text-box-trim and text-box-edge, and the value text-edge behind the preference layout.css.text-box.enabled in https://bugzilla.mozilla.org/show_bug.cgi?id=2013458.

This adds an experimental features entry and a release note entry that are essentially the same.
Tried to catch a flavour of what this does, which is make it possible to align text within a box so that it is visually positioned consistently for different fonts.

Related docs work can be tracked in #43208

@hamishwillee hamishwillee requested a review from a team as a code owner March 17, 2026 05:42
@hamishwillee hamishwillee requested review from dipikabh and removed request for a team March 17, 2026 05:42
@github-actions github-actions bot added Content:Firefox Content in the Mozilla/Firefox subtree size/s [PR only] 6-50 LoC changed labels Mar 17, 2026
@github-actions
Copy link
Contributor

Preview URLs (2 pages)

External URLs (2)

URL: /en-US/docs/Mozilla/Firefox/Experimental_features
Title: Experimental features in Firefox


URL: /en-US/docs/Mozilla/Firefox/Releases/149
Title: Firefox 149 release notes for developers (Beta)

Copy link
Contributor

@dipikabh dipikabh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Hamish!
I've left a few suggestions.

- `layout.css.text-decoration-trim.enabled`
- : Set to `true` to enable.

### `text-box`, `text-box-edge`, `text-box-trim`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we're ordering by release, this update should go after the "### @custom-media at-rule" entry

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### `text-box`, `text-box-edge`, `text-box-trim`
### `text-box`, `text-box-edge`, and `text-box-trim`


### `text-box`, `text-box-edge`, `text-box-trim`

The CSS {{cssxref("text-box")}} shorthand property, or the corresponding {{cssxref("text-box-trim")}} and {{cssxref("text-box-edge")}} longhand properties, allow you to trim space from the block-start and block-end edges of a text element's block container, aligning the container edges with the actual ink bounds of the text rather than the abstract box edges defined by font metrics.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Does <text-edge> also need to be mentioned?
  • This sentence is too long, can probably be split:
    • List features that have been added (that's where text-edge can probably be included)
    • "These allow you to.." (also "aligning" can be replaced to add another pause: "...block container; as a result, the container edges align with..."

Some other nits:

  • The first "or" should be "and"
  • text-box-trim and text-box-edge can be swapped to match the order in the heading

### `text-box`, `text-box-edge`, `text-box-trim`

The CSS {{cssxref("text-box")}} shorthand property, or the corresponding {{cssxref("text-box-trim")}} and {{cssxref("text-box-edge")}} longhand properties, allow you to trim space from the block-start and block-end edges of a text element's block container, aligning the container edges with the actual ink bounds of the text rather than the abstract box edges defined by font metrics.
This makes it possible to achieve consistent visual spacing around text regardless of which font is used.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This makes it possible to achieve consistent visual spacing around text regardless of which font is used.
This makes it possible to achieve consistent visual spacing around text regardless of the font used.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same edits can be applied here

@github-actions github-actions bot added the merge conflicts 🚧 [PR only] label Mar 18, 2026
@github-actions
Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:Firefox Content in the Mozilla/Firefox subtree merge conflicts 🚧 [PR only] size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants