Bug 235005 - [css-flexbox][css-grid] Support last baseline
Summary: [css-flexbox][css-grid] Support last baseline
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on: 243523 243524
Blocks: 236959
  Show dependency treegraph
 
Reported: 2022-01-08 10:51 PST by Philip Jägenstedt
Modified: 2022-10-12 10:13 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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).