Open Bug 1841317 Opened 2 years ago Updated 2 years ago

WPT failures in css/css-grid/grid-model/grid-container-ignores-first-[letter|line]-* due to failing to target first-letter/first-line in descendant nodes

Categories

(Core :: Layout: Block and Inline, defect)

defect

Tracking

()

People

(Reporter: twisniewski, Unassigned)

References

(Depends on 1 open bug, Blocks 2 open bugs)

Details

Summary: WPT failures in css/css-grid/grid-model/[grid-container-ignores-first-letter-001.html, grid-container-ignores-first-line-001.html] → WPT failures in css/css-grid/grid-model/grid-container-ignores-first-[letter|line]-001.html

Some (maybe all?) of this seems to be from us failing to target first-letters in descendant elements.

Reduced testcase:

data:text/html,<style>.c::first-letter{color:green;line-height:200px}</style><div class="c"><div>Nested</div></div><div class="c">Not nested</div>

We don't apply any special styling to the first "N" in "Nested", while Chrome does. (We do apply special styling to the "N" of "Not nested", though.)

Severity: -- → S3
Component: CSS Parsing and Computation → Layout: Block and Inline

(The actual WPT test has a grid container as a previous-sibling of the block container element, and the test is skipping that we ignore the grid. But we're not hitting the nested block at all with our first-letter styling, regardless of whether the grid is there.)

Duplicate of this bug: 1841318
Summary: WPT failures in css/css-grid/grid-model/grid-container-ignores-first-[letter|line]-001.html → WPT failures in css/css-grid/grid-model/grid-container-ignores-first-[letter|line]-* due to failing to target letters/line in descendant nodes
Summary: WPT failures in css/css-grid/grid-model/grid-container-ignores-first-[letter|line]-* due to failing to target letters/line in descendant nodes → WPT failures in css/css-grid/grid-model/grid-container-ignores-first-[letter|line]-* due to failing to target first-letter/first-line in descendant nodes

Indeed, thanks! Marking as depending on that bug (though it's sorta a dupe I guess).

Depends on: 317081

It looks like that bug is dependent on bug 1465474 which has some WIP work but it looks pretty substantial and non-trivial.

Definitely something we should fix when we have cycles, but it's entirely unrelated to grid. Possibly we should split out the actually grid-relevant parts here (the grid container ignoring these pseudos, and display:block grid items honoring them) from the unrelated-to-grid parts (the bug 317081 parts, RE the pseudos applying recursively to the first child of the block that they're specified on). And that latter part is definitely interesting to test, but seems like a stretch as being part of a "grid interop" focus area.

ni=me to push on comment 7.

Flags: needinfo?(dholbert)
No longer duplicate of this bug: 1841318

(In reply to Daniel Holbert [:dholbert] from comment #4)

These WPTs (from bug 1841318) are all the same underlying issue:
https://wpt.fyi/results/css/css-grid/grid-model/grid-first-letter-003.html
https://wpt.fyi/results/css/css-grid/grid-model/grid-first-line-003.html
https://wpt.fyi/results/css/css-grid/grid-model/grid-inline-first-letter-003.html
https://wpt.fyi/results/css/css-grid/grid-model/grid-inline-first-line-003.html

I've un-duped bug 1841318 to fix up these tests, so that they don't trip over bug 317081.

I think the tests in comment 0 here are testing something slightly different.

Flags: needinfo?(dholbert)
You need to log in before you can comment on or make changes to this bug.