AlignSelf enum

The align-self CSS property overrides a grid or flex item's align-items value. In grid, it aligns the item inside the grid area. In flexbox, it aligns the item on the cross axis.

Read more: MDN Align Self

Inheritance
Available extensions

Values

auto → const AlignSelf

Computes to the parent's align-items value.

const AlignSelf('auto')
normal → const AlignSelf

The effect of this keyword is dependent of the layout mode we are in:

  • In absolutely-positioned layouts, the keyword behaves like start on replaced absolutely-positioned boxes, and as stretch on all other absolutely-positioned boxes.
  • In static position of absolutely-positioned layouts, the keyword behaves as stretch.
  • For flex items, the keyword behaves as stretch.
  • For grid items, this keyword leads to a behavior similar to the one of stretch, except for boxes with an aspect ratio or an intrinsic size where it behaves like start.
  • The property doesn't apply to block-level boxes, and to table cells.
const AlignSelf('normal')
stretch → const AlignSelf

If the item's cross-size is auto, the used size is set to the length necessary to be as close to filling the container as possible, respecting the item's width and height limits. If the item is not auto-sized, this value falls back to flexStart, and to selfStart or selfEnd if the container's align-content is first baseline (or baseline) or last baseline.

const AlignSelf('stretch')
center → const AlignSelf

The flex item's margin box is centered within the line on the cross-axis. If the cross-size of the item is larger than the flex container, it will overflow equally in both directions.

const AlignSelf('center')
start → const AlignSelf

The cross-start margin edge of the item is flushed with the cross-start edge of the line.

const AlignSelf('start')
end → const AlignSelf

The cross-end margin edge of the item is flushed with the cross-end edge of the line.

const AlignSelf('end')
flexStart → const AlignSelf

The cross-start margin edge of the flex item is flushed with the cross-start edge of the line.

const AlignSelf('flex-start')
flexEnd → const AlignSelf

The cross-end margin edge of the flex item is flushed with the cross-end edge of the line.

const AlignSelf('flex-end')
selfStart → const AlignSelf

Aligns the items to be flush with the edge of the alignment container corresponding to the item's start side in the cross axis.

const AlignSelf('self-start')
selfEnd → const AlignSelf

Aligns the items to be flush with the edge of the alignment container corresponding to the item's end side in the cross axis.

const AlignSelf('self-end')
anchorCenter → const AlignSelf

In the case of anchor-positioned elements, aligns the item to the center of the associated anchor element in the block direction. See Centering on the anchor using anchor-center.

const AlignSelf('anchor-center')
baseline → const AlignSelf

Specifies participation in baseline alignment: aligns the alignment baseline of the box's baseline set with the corresponding baseline in the shared baseline set of all the boxes in its baseline-sharing group.

const AlignSelf('baseline')
firstBaseline → const AlignSelf

Specifies participation in first-baseline alignment: aligns the alignment baseline of the box's first baseline set with the corresponding baseline in the shared first baseline set of all the boxes in its baseline-sharing group. The fallback alignment is start.

const AlignSelf('first baseline')
lastBaseline → const AlignSelf

Specifies participation in last-baseline alignment: aligns the alignment baseline of the box's last baseline set with the corresponding baseline in the shared last baseline set of all the boxes in its baseline-sharing group. The fallback alignment is end.

const AlignSelf('last baseline')
inherit → const AlignSelf
const AlignSelf('inherit')
initial → const AlignSelf
const AlignSelf('initial')
revert → const AlignSelf
const AlignSelf('revert')
revertLayer → const AlignSelf
const AlignSelf('revert-layer')
unset → const AlignSelf
const AlignSelf('unset')

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value String
The css value
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<AlignSelf>
A constant List of the values in this enum, in order of their declaration.