<baseline-position> CSS type
The <baseline-position> enumerated value type represents a baseline alignment with the first or last modifier.
Associated properties
This data type is accepted in the values of the following CSS properties:
Syntax
<baseline-position> = [ first | last ]? && baseline
Values
The <baseline-position> data type is defined using a keyterm value chosen from the following list:
baseline-
Computes to
first baseline. first baseline-
Aligns the alignment baseline of the box's first baseline set with the corresponding baseline of its baseline-sharing group.
last baseline-
Aligns the alignment baseline of the box's last baseline set with the corresponding baseline of its baseline-sharing group.
Description
The <baseline-position> enumerated value type is specified using an optional first or last modifier with the baseline value.
The first and last values give a box a baseline alignment preference, defaulting to first if the modifier is omitted.
Baseline alignment is a positional alignment that aligns alignable features within a shared alignment context (such as cells within a row) by matching up their alignment baselines. For justify-self and align-self, the aligned feature is the item's margin box. With justify-content and align-content, the content feature that determines the alignment depends on the layout mode.
If the alignment position of the elements within a baseline-sharing group is not fully constrained by baseline alignment (i.e., they could be shifted within their respective alignment containers while maintaining baseline alignment), they are fallback-aligned. The fallback alignment is also used to align the baseline-sharing group within its alignment container:
- The fallback alignment for
baselineandfirst baselineissafe self-startfor self-alignment orsafe startfor content distribution. - The fallback alignment for
last baselineissafe self-endfor self-alignment orsafe endfor content distribution.
Specifications
| Specification |
|---|
| CSS Box Alignment Module Level 3> # typedef-baseline-position> |
See also
- Properties that use this data type:
align-content,align-items,align-self,justify-items,justify-self,place-content,place-items, andplace-self - Other box alignment data types:
<content-distribution>,<content-position>,<overflow-position>, and<self-position> - CSS box alignment module
- CSS flexible box layout module
- CSS grid layout module