Bug 235005

Summary: [css-flexbox][css-grid] Support last baseline
Product: WebKit Reporter: Philip Jägenstedt <philip>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: sgill26, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 243523, 243524    
Bug Blocks: 236959    

Description Philip Jägenstedt 2022-01-08 10:51:42 PST
The `last baseline` keyword for alignment properties (align-content, align-items, and align-self) is recognized by the parser but for both flex and grid layout, there are FIXMEs for actually supporting it:
https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp?rev=287742#L1679
https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/rendering/RenderGrid.cpp?rev=287742#L1437

Support for this in other browsers can be seen here:
https://developer.mozilla.org/en-US/docs/Web/CSS/align-content#browser_compatibility
https://developer.mozilla.org/en-US/docs/Web/CSS/align-items#browser_compatibility
https://developer.mozilla.org/en-US/docs/Web/CSS/align-self#browser_compatibility

Note that the data is a bit messy and also wrong in places, which is why I started looking into support across browsers and filed this bug.

https://crbug.com/885175 is the Chromium bug for this.
Comment 1 Radar WebKit Bug Importer 2022-01-15 10:52:16 PST
<rdar://problem/87640022>
Comment 2 Philip Jägenstedt 2022-10-12 08:56:35 PDT
Bug 245792 did something, but I'm not sure if it fixed this bug. (Haven't tested.)
Comment 3 Sammy Gill 2022-10-12 10:13:59 PDT
(In reply to Philip Jägenstedt from comment #2)
> Bug 245792 did something, but I'm not sure if it fixed this bug. (Haven't
> tested.)

Not quite. That bug implemented the ability to get the last baseline of block containers via lastLineBaseline. There are a number of other bugs open that are similar but for other objects. These will be used to actually align items by last baseline for flex containers and grids (which are other bugs).