Module CSS.​Length

module Length : sig..end

type t =  | Zero(* <<div class="odocwiki_info"|~For ~0~, unit is optional
>> *) | Em of float(* <<div class="odocwiki_info"|~Relative to the font size
>> *) | Ex of float(* <<div class="odocwiki_info"|~Relative to the x~-height
>> *) | Px of float(* <<div class="odocwiki_info"|~Relative to the viewing device
>> *) | Gd of float(* <<div class="odocwiki_info"|~Relative to the grid
>> *) | Rem of float(* <<div class="odocwiki_info"|~Relative to the font size of the root
>> *) | Vw of float(* <<div class="odocwiki_info"|~Relative to the viewport~'s width
>> *) | Vh of float(* <<div class="odocwiki_info"|~Relative to the viewport~'s height
>> *) | Vm of float(* <<div class="odocwiki_info"|~Relative to the smallest of the viewport~'s width or height
>> *) | Ch of float(* <<div class="odocwiki_info"|~Relative to the width of a char ~'~0~'
>> *) | Mm of float(* <<div class="odocwiki_info"|in ~Milimeter
>> *) | Cm of float(* <<div class="odocwiki_info"|in ~Centimeter
>> *) | In of float(* <<div class="odocwiki_info"|in ~Inch
>> *) | Pt of float(* <<div class="odocwiki_info"|in ~Points ~(~7~2pt ~= ~1in~)
>> *) | Pc of float(* <<div class="odocwiki_info"|in ~Picas ~(~1pc ~= ~1~2pt~)
>> *)

The type of length attributes. Mdc documentation: https://developer.mozilla.org/en/CSS/length and specification: http://www.w3.org/TR/css3-values/#lengths

type js_t = private Js.js_string Js.t

Js representation of lengths.

Conversion functions

val string_of_t : t -> string
val js : t -> js_t
val ml : js_t -> t