package toffee

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

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.