Controls the positioning of a single flex or grid element along the transverse axis of its container.
Class | Property |
as-auto | align-self: auto; |
as-b | align-self: baseline; |
as-c | align-self: center; |
as-fe | align-self: flex-end; |
as-fs | align-self: flex-start; |
as-s | align-self: stretch; |
Auto
Sets the align-self
property to auto
.
Baseline
Aligns the item to the baseline of the container.
Center
Centers the middle item within the container.
Flex-End
Moves the middle item to the end of the flex container.
Flex-Start
Aligns the middle item to the start of the flex container.
Stretch
Stretches the middle item to fill the container.
Using responsive modifiers
Using responsive breakpoints like sm:as-*
,
md:as-*
, lg:as-*
, and xxl:as-*
allows targeting specific utilities in
different viewports.
Using hover modifiers
Using :hover
modifiers such as h:as-*
allows
you to override elements and change their values when hovering over them.