PhoenixKitDashboards.Lattice (PhoenixKitDashboards v0.2.0)

Copy Markdown View Source

The grid design space: a GAPLESS lattice of nominal 25px square cells.

A layout's cols × rows is exactly one screenful of STANDARD cells — nothing ever scrolls. The fit hook stretches per-axis only to absorb the last ~10% (a fitted screen fills exactly edge-to-edge); otherwise the intact artboard shrinks into a smaller pane, or floats centered at natural size in a bigger one — never blown up (a bigger display wants its own fitted layout). Widget cards carry a small internal margin instead of grid gaps, and content self-fits via container-query type scaling. All widget sizes (default, min, per-view minimums) are declared in lattice units.

Summary

Functions

The nominal square cell size in design px.

Design-space canvas height for a row count.

Design-space canvas width for a column count.

Hard upper bound for layout dimensions and widget spans.

Hard lower bound for layout dimensions.

Per-axis stretch tolerance (see moduledoc).

Functions

cell()

@spec cell() :: pos_integer()

The nominal square cell size in design px.

design_height(rows)

@spec design_height(pos_integer()) :: pos_integer()

Design-space canvas height for a row count.

design_width(cols)

@spec design_width(pos_integer()) :: pos_integer()

Design-space canvas width for a column count.

max_dim()

@spec max_dim() :: pos_integer()

Hard upper bound for layout dimensions and widget spans.

min_dim()

@spec min_dim() :: pos_integer()

Hard lower bound for layout dimensions.

stretch_tolerance()

@spec stretch_tolerance() :: float()

Per-axis stretch tolerance (see moduledoc).