package toffee

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

Module Style.Box_generation_modeSource

CSS box generation mode.

This module represents an abstracted version of the CSS display property where any value other than none is represented by Normal. It determines whether a node and its descendants should generate boxes in the layout tree.

See CSS Display Module Level 3 - Box Generation.

Sourcetype t =
  1. | Normal
    (*

    The node generates a box in the regular way.

    *)
  2. | None
    (*

    The node and its descendants generate no boxes. They are hidden and do not participate in layout.

    *)

Constants

Sourceval default : t

default returns Normal.

Utilities

Sourceval equal : t -> t -> bool

equal a b returns true if a and b are the same box generation mode.

Sourceval compare : t -> t -> int

compare a b compares two box generation modes. Returns 0 if equal, a negative integer if a < b, or a positive integer if a > b.

Sourceval to_string : t -> string

to_string mode converts a box generation mode to its string representation. Returns "normal" or "none".

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

pp fmt mode prints a box generation mode to a formatter.