package toffee

  1. Overview
  2. Docs
CSS layout engine for OCaml (Flexbox, Grid, Block)

Install

dune-project
 Dependency

Authors

Maintainers

Sources

mosaic-0.1.0.tbz
sha256=9e4e90d17f9b2af1b07071fe425bc2c519c849c4f1d1ab73cde512be2d874849
sha512=06e9c4a741590942e81a27738d0b5c0413fafec8cf3b7dae047ad69f155e7b718aa4223818dc161b7d028efffcfd3365905e264d6fd31d453910ddfa91dcf9b9

doc/toffee.style/Style/Track_sizing_function/Min/index.html

Module Track_sizing_function.MinSource

Operations on the minimum sizing function component.

Sourceval is_intrinsic : t -> bool

is_intrinsic t returns true if the min component is min-content, max-content, or auto.

Sourceval is_min_or_max_content : t -> bool

is_min_or_max_content t returns true if the min component is min-content or max-content.

Sourceval is_fr : t -> bool

is_fr t returns true if the min component is an fr value.

Sourceval is_auto : t -> bool

is_auto t returns true if the min component is auto.

Sourceval is_min_content : t -> bool

is_min_content t returns true if the min component is min-content.

Sourceval is_max_content : t -> bool

is_max_content t returns true if the min component is max-content.

Sourceval definite_value : t -> float option -> float option

definite_value t parent_size resolves the min component to a concrete value.

Returns Some value for fixed lengths or percentages (when parent_size is Some). Returns None for intrinsic or flexible values.

Sourceval definite_value_with_calc : t -> float option -> (int -> float -> float) -> float option

definite_value_with_calc t parent_size calc_resolver resolves the min component, including calc() expressions.

The calc_resolver is called with a calc index and parent size to resolve calc values.

Sourceval resolved_percentage_size : t -> float -> float option

resolved_percentage_size t parent_size resolves percentage values.

Returns Some (value * parent_size) for percentage values. Returns None otherwise.

Sourceval uses_percentage : t -> bool

uses_percentage t returns true if the min component depends on parent size.