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/Box_sizing/index.html

Module Style.Box_sizingSource

CSS box-sizing property.

Specifies whether size styles for a node apply to its content box or border box.

The content box is the node's inner size excluding padding, border, and margin. The border box is the node's outer size including padding and border but excluding margin.

This property affects the interpretation of the following size styles:

  • size
  • min_size
  • max_size
  • flex_basis (in flexbox layout)

See MDN box-sizing documentation.

Sourcetype t =
  1. | Border_box
    (*

    Size styles specify the box's border box.

    The size includes padding and border but excludes margin. This is the default behavior and matches the CSS box-sizing: border-box property.

    *)
  2. | Content_box
    (*

    Size styles specify the box's content box.

    The size excludes padding, border, and margin. Matches the CSS box-sizing: content-box property.

    *)
Sourceval default : t

default returns Border_box.

Sourceval to_string : t -> string

to_string box_sizing converts the box sizing mode to its CSS string representation.

Returns "border-box" for Border_box and "content-box" for Content_box.

Sourceval equal : t -> t -> bool

equal a b tests structural equality.

Sourceval compare : t -> t -> int

compare a b compares box sizing modes for use in ordered containers.

Sourceval pp : Format.formatter -> t -> unit

pp fmt t prints the box sizing mode to the formatter.