package toffee

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

Install

dune-project
 Dependency

Authors

Maintainers

Sources

mosaic-0.3.0.tbz
sha256=a92cbbcbe016fb19fb0a749222da0e459a9567aef3f4c7340d9bd6b71c53ed6f
sha512=6a7ab054605538bb31a2b73a1a6d093981a2704c9f0af5852221c05735290d74aca7c7282298c4d0f91e86a800e2ccd94b4918af883cd963449c758eb6b272b3

doc/toffee.geometry/Toffee_geometry/Absolute_axis/index.html

Module Toffee_geometry.Absolute_axisSource

Absolute horizontal and vertical axis representation.

This module provides a simple representation of the two absolute geometric axes in 2D space: horizontal (x-axis) and vertical (y-axis). Unlike abstract axes which depend on writing mode, absolute axes have fixed orientation.

Absolute axes are used throughout the layout engine to index into geometric primitives like Size, Rect, and Point in a direction-agnostic way.

Sourcetype t =
  1. | Horizontal
    (*

    The horizontal axis (x-axis)

    *)
  2. | Vertical
    (*

    The vertical axis (y-axis)

    *)
Sourceval other : t -> t

other axis returns the perpendicular axis. Useful for iterating over both axes or selecting the cross-axis in layout computations.