w3c / w3c/csswg-drafts

[css-inline-3] Clarification on text-box-trim propagation and independent block formatting contexts

Open
#14,136 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

css-inline-3
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

There was a related issue at https://github.com/w3c/csswg-drafts/issues/11038 but I couldn't quite identift whether this specific question about text-box-trim was resolved.

CSS Inline 3 says the below regarding text-box-trim, which doesn't seem to include specific behavior for independent BFCs. I don't see anything else about propagation in this property definition (other than column containers).

Note: Like ::first-line, this property does not apply to, or propagate through, flex, grid, or table formatting contexts.

CSS Pseudo 4 does say the following about the first formatted line, though.

Note: The first line of a block container that does not itself participate in a block formatting context cannot be the first formatted line of an ancestor element.

I'm not 100% sure, but I think the "does not itself participate in a block formatting context" is synonymous with "establishes an independent block formatting context"? Does this definition mean that text-box-trim does not propagate through independent BFCs?

That's my interpretation, but there's an existing WPT that asserts the opposite - new-fc-001.html passes if text-box-trim does propagate to an independent BFC (a display: flow-root in this case). Blink passes that, Gecko and WebKit do not. I was going to add additional tests to assert that propagation doesn't happen with other BFC-establishing children, but this existing WPT has me a bit perplexed.

(Tracking this on the Gecko side at https://bugzilla.mozilla.org/show_bug.cgi?id=2049484)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the CSS Inline 3 text-box-trim definition and the CSS Pseudo 4 first-formatted-line wording, then compare them with the related issue 11038. Run or inspect the WPT case css/css-inline/text-box-trim/new-fc-001.html and review the linked Gecko bug. Done means the propagation behavior for independent BFCs is resolved in the specification and the test expectation is aligned.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
documentation, testing
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.