package toffee

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Style.Align_itemsSource

Controls how child nodes are aligned.

For Flexbox it controls alignment in the cross axis. For Grid it controls alignment in the block axis.

See MDN: align-items.

Sourcetype t =
  1. | Start
    (*

    Pack items toward the start of the axis.

    *)
  2. | End
    (*

    Pack items toward the end of the axis.

    *)
  3. | Flex_start
    (*

    Pack items toward the flex-relative start of the axis.

    For flex containers with flex_direction Row_reverse or Column_reverse, this is equivalent to End. In all other cases it is equivalent to Start.

    *)
  4. | Flex_end
    (*

    Pack items toward the flex-relative end of the axis.

    For flex containers with flex_direction Row_reverse or Column_reverse, this is equivalent to Start. In all other cases it is equivalent to End.

    *)
  5. | Center
    (*

    Pack items along the center of the axis.

    *)
  6. | Baseline
    (*

    Align items such that their baselines align.

    *)
  7. | Stretch
    (*

    Stretch items to fill the container.

    *)
Sourceval default : t

default returns Stretch.

Sourceval to_string : t -> string

to_string x converts the alignment value to its CSS string representation.