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.geometry/Geometry/Absolute_axis/index.html

Module 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.