Raxol.Style.Layout (Raxol v0.5.0)

View Source

Handles layout styling for Raxol components.

Summary

Functions

Gets the alignment from a layout style.

Gets the border from a layout style.

Gets the display property from a layout style.

Gets the flex properties from a layout style.

Gets the grid properties from a layout style.

Gets the margin from a layout style.

Gets the overflow behavior from a layout style.

Gets the padding from a layout style.

Gets the position from a layout style.

Gets the z-index from a layout style.

Creates a new layout style with default values.

Creates a new layout style with the specified margin.

Sets the alignment for a layout style.

Sets the border for a layout style.

Sets the display property for a layout style.

Sets the flex properties for a layout style.

Sets the grid properties for a layout style.

Sets the margin for a layout style.

Sets the overflow behavior for a layout style.

Sets the padding for a layout style.

Sets the position for a layout style.

Sets the z-index for a layout style.

Types

t()

@type t() :: %Raxol.Style.Layout{
  alignment: :start | :center | :end | :space_between | :space_around,
  border: {atom(), atom(), atom(), atom()},
  display: :block | :inline | :flex | :grid | :none,
  flex: map(),
  grid: map(),
  margin:
    {non_neg_integer(), non_neg_integer(), non_neg_integer(), non_neg_integer()},
  overflow: :visible | :hidden | :scroll | :auto,
  padding:
    {non_neg_integer(), non_neg_integer(), non_neg_integer(), non_neg_integer()},
  position: :static | :relative | :absolute | :fixed,
  z_index: integer()
}

Functions

get_alignment(style)

Gets the alignment from a layout style.

get_border(style)

Gets the border from a layout style.

get_display(style)

Gets the display property from a layout style.

get_flex(style)

Gets the flex properties from a layout style.

get_grid(style)

Gets the grid properties from a layout style.

get_margin(style)

Gets the margin from a layout style.

get_overflow(style)

Gets the overflow behavior from a layout style.

get_padding(style)

Gets the padding from a layout style.

get_position(style)

Gets the position from a layout style.

get_z_index(style)

Gets the z-index from a layout style.

new()

Creates a new layout style with default values.

new(margin)

Creates a new layout style with the specified margin.

set_alignment(style, alignment)

Sets the alignment for a layout style.

set_border(style, border, style \\ nil)

Sets the border for a layout style.

set_display(style, display)

Sets the display property for a layout style.

set_flex(style, flex)

Sets the flex properties for a layout style.

set_grid(style, grid)

Sets the grid properties for a layout style.

set_margin(style, margin)

Sets the margin for a layout style.

set_overflow(style, overflow)

Sets the overflow behavior for a layout style.

set_padding(style, padding)

Sets the padding for a layout style.

set_position(style, position)

Sets the position for a layout style.

set_z_index(style, z_index)

Sets the z-index for a layout style.