← Back to release summary

Last Baseline Item Alignment

Category
CSS
Type
Chromium catches up
Status
Enabled by default (Chrome 108)
Intent stage
Prepare to ship

WPT details: As part of implementing this feature we added a significant amount of tests: https://wpt.fyi/results/css?label=master&label=experimental&aligned&view=subtest&q=flex-align-baseline%20or%20grid-align-baseline%20or%20grid-justify-baseline These tests cover the combination of: - Outer layout (either grid/flex). - Inner layout (grid/flex/block/scroll-container/line-clamp/multicol/fieldset/table) - Writing-mode (horizontal-tb/vertical-rl/vertical-lr).

Summary

This feature allows developers to align items within either flex or grid layout by their last baseline, instead of their first. This is done via the following properties: align-items: last baseline; /* flex/grid container */ justify-items: last baseline; /* grid container */ align-self: last baseline; /* flex/grid item */ justify-self: last baseline; /* grid item */

Motivation

Currently in Blink we only support aligning grid/flex-items via. their first baseline. This feature allows web developers to align these items by their last baseline.

Standards & signals

Ecosystem

View on chromestatus.com