package css

  1. Overview
  2. Docs

Types and base definitions.

Utils

module Smap : sig ... end

Maps of strings.

module Sset : sig ... end

String sets.

module Imap : sig ... end

Maps over integers.

val mk_pp : ('a -> string) -> Stdlib.Format.formatter -> 'b -> unit

mk_pp f creates a formatter -> x -> unit function from the given x -> string function.

val string_of_list : string -> ('a -> string) -> 'a list -> string

string_of_list sep to_string l is String.concat sep (List.map to_string l).

val mk_of_string : ?case_sensitive:bool -> ('a -> string) -> 'b list -> string -> 'c option

mk_of_string to_string l returns a function mapping strings to values, according to the reverse function to_string. Optional argument case_sensitive (default is true) indicates where case is taken into account when mapping from string to values. The returned function returns None if the given string could not be mapped to a value, else Some value.

Positions and locations

type pos = Stdlib.Lexing.position
type loc = pos * pos
type 'a with_loc = 'a * loc
type 'a with_loc_option = 'a * loc option
val dummy_loc : Stdlib.Lexing.position * Stdlib.Lexing.position
val string_of_loc : (Stdlib.Lexing.position * Stdlib.Lexing.position) -> string
val string_of_loc_option : (Stdlib.Lexing.position * Stdlib.Lexing.position) option -> string
val pp_loc : Stdlib.Format.formatter -> (Stdlib.Lexing.position * Stdlib.Lexing.position) -> unit
val pp_loc_option : Stdlib.Format.formatter -> (Stdlib.Lexing.position * Stdlib.Lexing.position) option -> unit
val pos_of_string_at : ?fname:string -> ?from:(int * Stdlib.Lexing.position) -> string -> int -> Stdlib.Lexing.position

pos_of_string_at str at returns the pos corresponding to offset at in the given string. Optional arguments:

  • fname specifies a filename to use in the returned position.
  • from, as a pair (offset, p), specifies to start at offset, using p as initial pos structure. The fname in returned position still is the optiona fname argument.
val loc_of_string_at : string -> int -> Stdlib.Lexing.position * Stdlib.Lexing.position

Parsing contexts

type ctx = {
  1. get_pos : pos Angstrom.t;
  2. last_pos : pos Angstrom.t;
  3. string_of_loc : loc -> string;
}

A context is used in parsers to retrieve location information. get_pos returns the current position. last_pos returns the most advanced position seen. string_of_loc returns the string corresponding to the given location.

val ctx : (int -> pos) -> ctx

ctx get_pos builds a new context with the given get_pos functions.

val string_ctx : ?fname:string -> string -> ctx

 string_ctx str creates a context from the given string str. Computing of pos structure is cached. fname can be specified to set this field in positions.

Error handling

type parse_error =
  1. | Unterminated_string
  2. | Unterminated_comment
  3. | Unterminated_char_escape
  4. | Invalid_iri of string * Iri.error
  5. | Other of string

Parsing errors.

type error =
  1. | Parse_error of pos option * parse_error
  2. | Undefined_namespace of string * loc
exception Error of error
val string_of_parse_error : parse_error -> string
val string_of_error : ?to_loc:(loc -> string) -> error -> string
val pp_error : Stdlib.Format.formatter -> error -> unit
val error : error -> 'a

Global keywords

type global_kw = [
  1. | `Inherit
  2. | `Initial
  3. | `Revert
  4. | `Revert_layer
  5. | `Unset
]
val global_kws : [> `Inherit | `Initial | `Revert | `Revert_layer | `Unset ] list
type 'a p_value = [
  1. | global_kw
  2. | `Var of string * string option
  3. | `V of 'a
]

A 'a p_value is either a global keyword, a variable (`Var (name, optional string value)) or a value (`V 'a). We do not know at variable definition time in which property this variable will be used. The parser associated to a property will parse the optional default variable value when the variable is expanded.

val string_of_p_value : ('a -> string) -> 'a p_value -> string
val pp_p_value : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a p_value -> unit
type str = {
  1. s : string;
  2. quoted : bool;
}

Parsed strings, with a quoted flag indicating whether string is quoted.

val string_of_str : str -> string
val pp_str : Stdlib.Format.formatter -> str -> unit

CSS Value types

type side = [
  1. | `Bottom
  2. | `Left
  3. | `Right
  4. | `Top
]
val sides : [> `Bottom | `Left | `Right | `Top ] list
val string_of_side : side -> string
type lcr = [
  1. | `Left
  2. | `Center
  3. | `Right
]
type number = float
val string_of_number : float -> string
val pp_number : Stdlib.Format.formatter -> float -> unit
type rel_length_unit = [
  1. | `em
    (*

    Font size of the element.

    *)
  2. | `ex
    (*

    x-height of the element's font.

    *)
  3. | `cap
    (*

    Cap height (the nominal height of capital letters) of the element's font.

    *)
  4. | `ch
    (*

    Average character advance of a narrow glyph in the element's font, as represented by the "0" (ZERO, U+0030) glyph.

    *)
  5. | `ic
    (*

    Average character advance of a full width glyph in the element's font, as represented by the "水" (CJK water ideograph, U+6C34) glyph.

    *)
  6. | `rem
    (*

    Font size of the root element.

    *)
  7. | `lh
    (*

    Line height of the element.

    *)
  8. | `rlh
    (*

    Line height of the root element.

    *)
  9. | `vw
    (*

    1% of viewport's width.

    *)
  10. | `vh
    (*

    1% of viewport's height.

    *)
  11. | `vi
    (*

    1% of viewport's size in the root element's inline axis.

    *)
  12. | `vb
    (*

    1% of viewport's size in the root element's block axis.

    *)
  13. | `vmin
    (*

    1% of viewport's smaller dimension.

    *)
  14. | `vmax
    (*

    1% of viewport's larger dimension.

    *)
  15. | `cqw
    (*

    1% of a query container's width

    *)
  16. | `cqh
    (*

    1% of a query container's height

    *)
  17. | `cqi
    (*

    1% of a query container's inline size

    *)
  18. | `cqb
    (*

    1% of a query container's block size

    *)
  19. | `cqmin
    (*

    The smaller value of cqi or cqb

    *)
  20. | `cqmax
    (*

    The larger value of cqi or cqb

    *)
]
val rel_length_units : [> `cap | `ch | `cqb | `cqh | `cqi | `cqmax | `cqmin | `cqw | `em | `ex | `ic | `lh | `rem | `rlh | `vb | `vh | `vi | `vmax | `vmin | `vw ] list
val string_of_rel_length_unit : rel_length_unit -> string
type abs_length_unit = [
  1. | `cm
    (*

    Centimeters 1cm = 96px/2.54

    *)
  2. | `mm
    (*

    Millimeters 1mm = 1/10th of 1cm

    *)
  3. | `q
  4. | `In
    (*

    Inches 1in = 2.54cm = 96px

    *)
  5. | `pc
    (*

    Picas 1pc = 1/6th of 1in

    *)
  6. | `pt
    (*

    Points 1pt = 1/72th of 1in

    *)
  7. | `px
    (*

    Pixels 1px = 1/96th of 1in

    *)
]
val abs_length_units : [> `In | `cm | `mm | `pc | `pt | `px | `q ] list
val string_of_abs_length_unit : abs_length_unit -> string
type length_unit = [
  1. | rel_length_unit
  2. | abs_length_unit
]
val string_of_length_unit : length_unit -> string
val pp_length_unit : Stdlib.Format.formatter -> length_unit -> unit
type angle_unit = [
  1. | `deg
    (*

    Degrees There are 360 degrees in a full circle.

    *)
  2. | `grad
    (*

    Gradians There are 400 gradians in a full circle.

    *)
  3. | `rad
    (*

    Radians There are 2__pi__ radians in a full circle.

    *)
  4. | `turn
    (*

    Turns There is 1 turn in a full circle.

    *)
]
val angle_units : [> `deg | `grad | `rad | `turn ] list
val string_of_angle_unit : angle_unit -> string
val pp_angle_unit : Stdlib.Format.formatter -> angle_unit -> unit
type angle = number * angle_unit
val string_of_angle : (float * angle_unit) -> string
val pp_angle : Stdlib.Format.formatter -> (float * angle_unit) -> unit
type time_unit = [
  1. | `s
  2. | `ms
]
val time_units : [> `ms | `s ] list
val string_of_time_unit : time_unit -> string
val pp_time_unit : Stdlib.Format.formatter -> time_unit -> unit
type freq_unit = [
  1. | `hz
  2. | `khz
]
val freq_units : [> `hz | `khz ] list
val string_of_freq_unit : freq_unit -> string
val pp_freq_unit : Stdlib.Format.formatter -> freq_unit -> unit
type flex_unit = [
  1. | `fr
]
val flex_units : [> `fr ] list
val string_of_flex_unit : flex_unit -> string
val pp_flex_unit : Stdlib.Format.formatter -> flex_unit -> unit
type resolution_unit = [
  1. | `dpi
    (*

    Dots per inch.

    *)
  2. | `dpcm
    (*

    Dots per centimeter.

    *)
  3. | `dppx
  4. | `x
    (*

    Dots per px unit.

    *)
]
val resolution_units : [> `dpcm | `dpi | `dppx | `x ] list
val string_of_resolution_unit : resolution_unit -> string
val pp_resolution_unit : Stdlib.Format.formatter -> resolution_unit -> unit
val string_of_dim_unit : dim_unit -> string
val pp_dim_unit : Stdlib.Format.formatter -> dim_unit -> unit
type dimension = number * dim_unit
val string_of_dimension : float -> dim_unit -> string
type system_color = [
  1. | `AccentColorText
  2. | `ActiveText
  3. | `ButtonBorder
  4. | `ButtonFace
  5. | `ButtonText
  6. | `Canvas
  7. | `CanvasText
  8. | `Field
  9. | `FieldText
  10. | `GrayText
  11. | `Highlight
  12. | `HighlightText
  13. | `LinkText
  14. | `Mark
  15. | `MarkText
  16. | `SelectedItem
  17. | `SelectedItemText
  18. | `VisitedText
]
val system_colors : [> `AccentColorText | `ActiveText | `ButtonBorder | `ButtonFace | `ButtonText | `Canvas | `CanvasText | `Field | `FieldText | `GrayText | `Highlight | `HighlightText | `LinkText | `Mark | `MarkText | `SelectedItem | `SelectedItemText | `VisitedText ] list
val string_of_system_color : system_color -> string
val pp_system_color : Stdlib.Format.formatter -> system_color -> unit
val system_color_of_string : string -> system_color option
type color_kw = [
  1. | `Current_color
  2. | `Transparent
]
val color_kws : color_kw list
type color = [
  1. | `Rgba of float * float * float * float
  2. | `Named_color of string
  3. | `System_color of system_color
  4. | color_kw
]
val string_of_color : color -> string
val pp_color : Stdlib.Format.formatter -> color -> unit
type trblc = [
  1. | `Top
  2. | `Right
  3. | `Bottom
  4. | `Left
  5. | `Center
]
val trblc_kws : trblc list
val string_of_trblc : [< trblc ] -> string
type x_position_kw = [
  1. | `Left
  2. | `Center
  3. | `Right
]
val x_position_kws : [> `Center | `Left | `Right ] list
val string_of_x_position_kw : x_position_kw -> string
type y_position_kw = [
  1. | `Top
  2. | `Center
  3. | `Bottom
]
val y_position_kws : [> `Bottom | `Center | `Top ] list
val string_of_y_position_kw : y_position_kw -> string
type percentage = [
  1. | `Percent of number
]
val string_of_percentage : percentage -> string
type length_percentage = [
  1. | `Length of number * length_unit
  2. | percentage
]
val string_of_length : float -> length_unit -> string
val pp_length : Stdlib.Format.formatter -> (float * length_unit) -> unit
val string_of_length_percentage : length_percentage -> string
val pp_length_percentage : Stdlib.Format.formatter -> length_percentage -> unit
type 'a axis_pos =
  1. | Offset of length_percentage
  2. | Kw of 'a
  3. | KO of 'a * length_percentage
val string_of_axis_pos : [< trblc ] axis_pos -> string
type axis_position =
  1. | Single_kw of trblc
  2. | XY of x_position_kw axis_pos * y_position_kw axis_pos
type x_position = x_position_kw axis_pos
type y_position = y_position_kw axis_pos
val string_of_x_position : x_position -> string
val string_of_y_position : y_position -> string
val string_of_axis_position : axis_position -> string
val pp_axis_position : Stdlib.Format.formatter -> axis_position -> unit
val string_of_p_number : float p_value -> string
type size_kw = [
  1. | `Auto
  2. | `Max_content
  3. | `Min_content
]
val size_kws : size_kw list
type size = [
  1. | length_percentage
  2. | `Fit_content of length_percentage
  3. | size_kw
]
val string_of_size : size -> string
val pp_size : Stdlib.Format.formatter -> size -> unit
type max_size_kw = [
  1. | `None
  2. | `Max_content
  3. | `Min_content
]
val max_size_kws : max_size_kw list
type max_size = [
  1. | length_percentage
  2. | `Fit_content of length_percentage
  3. | max_size_kw
]
val string_of_max_size : max_size -> string
val pp_max_size : Stdlib.Format.formatter -> max_size -> unit
val string_of_url : Iri.t -> string
val pp_url : Stdlib.Format.formatter -> Iri.t -> unit
type line_style = [
  1. | `None
  2. | `Hidden
  3. | `Dotted
  4. | `Dashed
  5. | `Solid
  6. | `Double
  7. | `Groove
  8. | `Ridge
  9. | `Inset
  10. | `Outset
]
val line_styles : line_style list
val string_of_line_style : line_style -> string
val pp_line_style : Stdlib.Format.formatter -> line_style -> unit
type gradient = [
  1. | `Linear
  2. | `Repeating_linear
  3. | `Radial
  4. | `Repeating_radial
]
val string_of_gradient : gradient -> string
val pp_gradient : Stdlib.Format.formatter -> gradient -> unit
type image = [
  1. | `Url of Iri.t
  2. | `Gradient of gradient * string
  3. | `Function of string * string
]
val string_of_image : image -> string
val pp_image : Stdlib.Format.formatter -> image -> unit
type value =
  1. | String of str
  2. | Integer of int
  3. | Number of number
  4. | Dimension of dimension
  5. | Percent of number
  6. | Color of color
  7. | Position of axis_position
val string_of_value : value -> string
val pp_value : Stdlib.Format.formatter -> value -> unit
type accent_color_kw = [
  1. | `Auto
]
val accent_color_kws : accent_color_kw list
type accent_color = [
  1. | color
  2. | accent_color_kw
]
val string_of_accent_color : accent_color -> string
val pp_accent_color : Stdlib.Format.formatter -> accent_color -> unit
type baseline_position_kw = [
  1. | `Baseline
]
val baseline_position_kws : baseline_position_kw list
type baseline_position = [
  1. | baseline_position_kw
  2. | `First_baseline
  3. | `Last_baseline
]
val string_of_baseline_position : baseline_position -> string
val pp_baseline_position : Stdlib.Format.formatter -> baseline_position -> unit
type content_position_kw = [
  1. | `Center
  2. | `End
  3. | `Flex_end
  4. | `Flex_start
  5. | `Start
]
val content_position_kws : [> `Center | `End | `Flex_end | `Flex_start | `Start ] list
type content_position = content_position_kw
val string_of_content_position : content_position -> string
val pp_content_position : Stdlib.Format.formatter -> content_position -> unit
type content_position_lr_kw = [
  1. | content_position_kw
  2. | `Left
  3. | `Right
]
val content_position_lr_kws : [> `Center | `End | `Flex_end | `Flex_start | `Left | `Right | `Start ] list
type content_position_lr = content_position_lr_kw
val string_of_content_position_lr : content_position_lr -> string
val pp_content_position_lr : Stdlib.Format.formatter -> content_position_lr -> unit
type self_position_kw = [
  1. | `Self_start
  2. | `Self_end
  3. | content_position_kw
]
val self_position_kws : [> `Center | `End | `Flex_end | `Flex_start | `Self_end | `Self_start | `Start ] list
type self_position = self_position_kw
val string_of_self_position : self_position -> string
val pp_self_position : Stdlib.Format.formatter -> self_position -> unit
type self_position_lr_kw = [
  1. | self_position_kw
  2. | `Left
  3. | `Right
]
val self_position_lr_kws : [> `Center | `End | `Flex_end | `Flex_start | `Left | `Right | `Self_end | `Self_start | `Start ] list
type self_position_lr = self_position_lr_kw
val string_of_self_position_lr : self_position_lr -> string
val pp : 'a -> Stdlib.Format.formatter -> self_position_lr -> unit
type content_distribution_kw = [
  1. | `Space_around
  2. | `Space_between
  3. | `Space_evenly
  4. | `Stretch
]
val content_distribution_kws : [> `Space_around | `Space_between | `Space_evenly | `Stretch ] list
type content_distribution = content_distribution_kw
val string_of_content_distribution : content_distribution -> string
val pp_content_distribution : Stdlib.Format.formatter -> content_distribution -> unit
type align_content_kw = [
  1. | `Normal
]
val align_content_kws : align_content_kw list
val string_of_align_content : align_content -> string
val pp_align_content : Stdlib.Format.formatter -> align_content -> unit
type align_items_kw = [
  1. | `Normal
  2. | `Stretch
]
val align_items_kws : align_items_kw list
type align_items = [
  1. | baseline_position
  2. | self_position
  3. | `Safe_self_pos of self_position
  4. | `Unsafe_self_pos of self_position
  5. | align_items_kw
]
val string_of_align_items : align_items -> string
val pp_align_items : Stdlib.Format.formatter -> align_items -> unit
type align_self_kw = [
  1. | `Auto
]
val align_self_kws : align_self_kw list
type align_self = [
  1. | align_self_kw
  2. | align_items
]
val string_of_align_self : align_self -> string
val pp_align_self : Stdlib.Format.formatter -> align_self -> unit
type aspect_ratio_kw = [
  1. | `Auto
]
val aspect_ratio_kws : aspect_ratio_kw list
type aspect_ratio = [
  1. | `Ratio of number * number option
  2. | aspect_ratio_kw
]
val string_of_aspect_ratio : aspect_ratio -> string
val pp_aspect_ratio : Stdlib.Format.formatter -> aspect_ratio -> unit
val string_of_background_ : ('a -> string) -> 'a list -> string
type background_attachment_kw = [
  1. | `Fixed
  2. | `Local
  3. | `Scroll
]
val background_attachment_kws : background_attachment_kw list
type background_attachment_ = background_attachment_kw
type background_attachment = background_attachment_ list
val string_of_background_attachment : background_attachment -> string
val pp_background_attachment : Stdlib.Format.formatter -> background_attachment -> unit
type background_clip_kw = [
  1. | `Border_box
  2. | `Content_box
  3. | `Padding_box
  4. | `Text
]
val background_clip_kws : background_clip_kw list
type background_clip_ = background_clip_kw
type background_clip = background_clip_ list
val string_of_background_clip : background_clip -> string
val pp_background_clip : Stdlib.Format.formatter -> background_clip -> unit
type background_image_kw = [
  1. | `None
]
val background_image_kws : background_image_kw list
type background_image_ = [
  1. | `Image of image
  2. | background_image_kw
]
val string_of_background_image_ : background_image_ -> string
type background_image = background_image_ list
val string_of_background_image : background_image -> string
val pp_background_image : Stdlib.Format.formatter -> background_image -> unit
type background_origin_kw = [
  1. | `Border_box
  2. | `Content_box
  3. | `Padding_box
]
val background_origin_kws : background_origin_kw list
type background_origin_ = background_origin_kw
type background_origin = background_origin_ list
val string_of_background_origin : background_origin -> string
val pp_background_origin : Stdlib.Format.formatter -> background_origin -> unit
type background_position_x = x_position list
val string_of_background_position_x : background_position_x -> string
val pp_background_position_x : Stdlib.Format.formatter -> background_position_x -> unit
type background_position_y = y_position list
val string_of_background_position_y : background_position_y -> string
val pp_background_position_y : Stdlib.Format.formatter -> background_position_y -> unit
type repeat = [
  1. | `No_repeat
  2. | `Repeat
  3. | `Round
  4. | `Space
]
val repeat_kws : repeat list
val string_of_repeat : repeat -> string
val pp_repeat : Stdlib.Format.formatter -> repeat -> unit
type background_repeat_kw = [
  1. | `Repeat_x
  2. | `Repeat_y
]
val background_repeat_kws : background_repeat_kw list
type background_repeat_ = repeat * repeat
type background_repeat = background_repeat_ list
val string_of_background_repeat : background_repeat -> string
val pp_background_repeat : Stdlib.Format.formatter -> background_repeat -> unit
type background_size_kw = [
  1. | `Auto
  2. | `Contain
  3. | `Cover
]
val background_size_kws : background_size_kw list
type background_size_ = [
  1. | background_size_kw
  2. | length_percentage
]
val string_of_background_size_ : background_size_ -> string
type background_size = (background_size_ * background_size_) list
val string_of_background_size : background_size -> string
val pp_background_size : Stdlib.Format.formatter -> background_size -> unit
type background_color = color
val string_of_background_color : color -> string
val pp_background_color : Stdlib.Format.formatter -> color -> unit
type width = size
val string_of_width : size -> string
val pp_width : Stdlib.Format.formatter -> size -> unit
type border_width_kw = [
  1. | `Thin
  2. | `Medium
  3. | `Thick
]
val border_width_kws : border_width_kw list
type border_width = [
  1. | width
  2. | border_width_kw
]
val string_of_border_width : border_width -> string
val pp_border_width : Stdlib.Format.formatter -> border_width -> unit
type display_outside = [
  1. | `Block
  2. | `Inline
  3. | `Run_in
]
val display_outside_kws : display_outside list
type display_flow = [
  1. | `Flow
  2. | `Flow_root
]
val display_flow_kws : display_flow list
type display_inside = [
  1. | display_flow
  2. | `Table
  3. | `Flex
  4. | `Grid
  5. | `Ruby
]
val display_inside_kws : display_inside list
type display_listitem = display_outside * display_flow
type display_listitem_kw = [
  1. | `List_item
]
val display_listitem_kws : display_listitem_kw list
type display_internal = [
  1. | `Table_row_group
  2. | `Table_header_group
  3. | `Table_row
  4. | `Table_cell
  5. | `Table_column_group
  6. | `Table_column
  7. | `Table_caption
  8. | `Ruby_base
  9. | `Ruby_base_container
  10. | `Ruby_text
  11. | `Ruby_text_container
]
val display_internal_kws : display_internal list
type display_box = [
  1. | `Contents
  2. | `None
]
val display_box_kws : display_box list
type display_legacy = [
  1. | `Inline_block
  2. | `Inline_table
  3. | `Inline_flex
  4. | `Inline_grid
]
val display_legacy_kws : [> `Inline_block | `Inline_flex | `Inline_grid | `Inline_table ] list
type display_out_in = display_outside * display_inside * [ `List_item ] option
type display = [
  1. | `Out_in of display_out_in
  2. | display_internal
  3. | display_box
]
val string_of_display : display -> string
val pp_display : Stdlib.Format.formatter -> display -> unit
type flex_basis_kw = [
  1. | `Content
]
val flex_basis_kws : flex_basis_kw list
type flex_basis = [
  1. | flex_basis_kw
  2. | width
]
val string_of_flex_basis : flex_basis -> string
val pp_flex_basis : Stdlib.Format.formatter -> flex_basis -> unit
type flex_direction_kw = [
  1. | `Column
  2. | `Column_reverse
  3. | `Row
  4. | `Row_reverse
]
val flex_direction_kws : flex_direction_kw list
type flex_direction = flex_direction_kw
val string_of_flex_direction : flex_direction -> string
val pp_flex_direction : Stdlib.Format.formatter -> flex_direction -> unit
type flex_wrap_kw = [
  1. | `Nowrap
  2. | `Wrap
  3. | `Wrap_reverse
]
val flex_wrap_kws : flex_wrap_kw list
type flex_wrap = flex_wrap_kw
val string_of_flex_wrap : flex_wrap -> string
val pp_flex_wrap : Stdlib.Format.formatter -> flex_wrap -> unit
type font_family_generic_kw = [
  1. | `Cursive
  2. | `Emoji
  3. | `Fantasy
  4. | `Fangsong
  5. | `Math
  6. | `Monospace
  7. | `Sans_serif
  8. | `Serif
  9. | `System_ui
  10. | `Ui_monospace
  11. | `Ui_rounded
  12. | `Ui_sans_serif
  13. | `Ui_serif
]
val font_family_generic_kws : font_family_generic_kw list
type font_family_ = [
  1. | `Generic of font_family_generic_kw
  2. | `Family of string
]
val string_of_font_family_ : font_family_ -> string
type font_family = font_family_ list
val string_of_font_family : font_family -> string
val pp_font_family : Stdlib.Format.formatter -> font_family -> unit
type font_kerning = [
  1. | `Normal
  2. | `Auto
  3. | `None
]
val font_kerning_kws : font_kerning list
val string_of_font_kerning : font_kerning -> string
val pp_font_kerning : Stdlib.Format.formatter -> font_kerning -> unit
type font_size_kw = [
  1. | `Large
  2. | `Larger
  3. | `Math
  4. | `Medium
  5. | `Small
  6. | `Smaller
  7. | `Xxx_large
  8. | `Xx_large
  9. | `Xx_small
  10. | `X_large
  11. | `X_small
]
val font_size_kws : font_size_kw list
type font_size = [
  1. | font_size_kw
  2. | length_percentage
]
val string_of_font_size : font_size -> string
val pp_font_size : Stdlib.Format.formatter -> font_size -> unit
type font_stretch_kw = [
  1. | `Normal
  2. | `Ultra_condensed
  3. | `Extra_condensed
  4. | `Semi_condensed
  5. | `Condensed
  6. | `Ultra_expanded
  7. | `Extra_expanded
  8. | `Semi_expanded
  9. | `Expanded
]
val font_stretch_kws : font_stretch_kw list
type font_stretch = [
  1. | font_stretch_kw
  2. | percentage
]
val string_of_font_stretch : font_stretch -> string
val pp_font_stretch : Stdlib.Format.formatter -> font_stretch -> unit
type font_style_kw = [
  1. | `Normal
  2. | `Italic
]
val font_style_kws : font_style_kw list
type font_style = [
  1. | font_style_kw
  2. | `Oblique of angle option
]
val string_of_font_style : font_style -> string
val pp_font_style : Stdlib.Format.formatter -> font_style -> unit
type font_variant_alt = [
  1. | `Historical_forms
  2. | `Stylistic of string
  3. | `Styleset of string list
  4. | `Character_variant of string list
  5. | `Swash of string
  6. | `Ornaments of string
  7. | `Annotation of string
]
val string_of_font_variant_alt : [< `Annotation of string | `Character_variant of string list | `Historical_forms | `Ornaments of string | `Styleset of string list | `Stylistic of string | `Swash of string ] -> string
type font_variant_alternates = [
  1. | `Normal
  2. | `List of font_variant_alt list
]
val string_of_font_variant_alternates : font_variant_alternates -> string
val pp_font_variant_alternates : Stdlib.Format.formatter -> font_variant_alternates -> unit
type font_variant_caps = [
  1. | `Normal
  2. | `Small_caps
  3. | `All_small_caps
  4. | `Petite_caps
  5. | `All_petite_caps
  6. | `Unicase
  7. | `Titling_caps
]
val font_variant_caps_kws : font_variant_caps list
val string_of_font_variant_caps : font_variant_caps -> string
val pp_font_variant_caps : Stdlib.Format.formatter -> font_variant_caps -> unit
type font_variant_east_asian_kw = [
  1. | `Jis78
  2. | `Jis83
  3. | `Jis90
  4. | `Jis04
  5. | `Ruby
  6. | `Proportional_width
  7. | `Simplified
  8. | `Traditional
  9. | `Full_width
]
val font_variant_east_asian_kws : font_variant_east_asian_kw list
type font_variant_east_asian = [
  1. | `Normal
  2. | `List of font_variant_east_asian_kw list
]
val string_of_font_variant_east_asian : font_variant_east_asian -> string
val pp_font_variant_east_asian : Stdlib.Format.formatter -> font_variant_east_asian -> unit
type font_variant_emoji = [
  1. | `Normal
  2. | `Text
  3. | `Emoji
  4. | `Unicode
]
val font_variant_emoji_kws : font_variant_emoji list
val string_of_font_variant_emoji : font_variant_emoji -> string
val pp_font_variant_emoji : Stdlib.Format.formatter -> font_variant_emoji -> unit
type font_variant_ligatures_kw = [
  1. | `Common_ligatures
  2. | `No_common_ligatures
  3. | `Contextual
  4. | `No_contextual
  5. | `Discretionary_ligatures
  6. | `No_discretionary_ligatures
  7. | `Historical_ligatures
  8. | `No_historical_ligatures
]
val font_variant_ligatures_kws : [> `Common_ligatures | `Contextual | `Discretionary_ligatures | `Historical_ligatures | `No_common_ligatures | `No_contextual | `No_discretionary_ligatures | `No_historical_ligatures ] list
type font_variant_ligatures = [
  1. | `Normal
  2. | `None
  3. | `List of font_variant_ligatures_kw list
]
val string_of_font_variant_ligatures : font_variant_ligatures -> string
val pp_font_variant_ligatures : Stdlib.Format.formatter -> font_variant_ligatures -> unit
type font_variant_numeric_kw = [
  1. | `Ordinal
  2. | `Slashed_zero
  3. | `Lining_nums
  4. | `Oldstyle_nums
  5. | `Proportional_nums
  6. | `Tabular_nums
  7. | `Diagonal_frations
  8. | `Stacked_fractions
]
val font_variant_numeric_kws : [> `Diagonal_frations | `Lining_nums | `Oldstyle_nums | `Ordinal | `Proportional_nums | `Slashed_zero | `Stacked_fractions | `Tabular_nums ] list
type font_variant_numeric = [
  1. | `Normal
  2. | `List of font_variant_numeric_kw list
]
val string_of_font_variant_numeric : font_variant_numeric -> string
val pp_font_variant_numeric : Stdlib.Format.formatter -> font_variant_numeric -> unit
type font_variant_position = [
  1. | `Normal
  2. | `Sub
  3. | `Super
]
val font_variant_position_kws : font_variant_position list
val string_of_font_variant_position : font_variant_position -> string
val pp_font_variant_position : Stdlib.Format.formatter -> font_variant_position -> unit
type font_weight_kw = [
  1. | `Normal
  2. | `Bold
  3. | `Bolder
  4. | `Lighter
]
val font_weight_kws : [> `Bold | `Bolder | `Lighter | `Normal ] list
type font_weight = [
  1. | font_weight_kw
  2. | `Weight of int
]
val string_of_font_weight : font_weight -> string
val pp_font_weight : Stdlib.Format.formatter -> font_weight -> unit
type line_height_kw = [
  1. | `Normal
]
val line_height_kws : line_height_kw list
type line_height = [
  1. | line_height_kw
  2. | `Number of number
  3. | length_percentage
]
val string_of_line_height : line_height -> string
val pp_line_height : Stdlib.Format.formatter -> line_height -> unit
type system_font = {
  1. family : font_family_ list;
  2. size : font_size;
  3. stretch : font_stretch;
  4. style : font_style;
  5. variant_alternates : font_variant_alternates;
  6. variant_caps : font_variant_caps;
  7. variant_east_asian : font_variant_east_asian;
  8. variant_emoji : font_variant_emoji;
  9. variant_ligatures : font_variant_ligatures;
  10. variant_numeric : font_variant_numeric;
  11. variant_position : font_variant_position;
  12. weight : font_weight;
  13. line_height : line_height;
}
val system_font : ?stretch:font_stretch -> ?style:font_style -> ?variant_alternates:font_variant_alternates -> ?variant_caps:font_variant_caps -> ?variant_east_asian:font_variant_east_asian -> ?variant_emoji:font_variant_emoji -> ?variant_ligatures:font_variant_ligatures -> ?variant_numeric:font_variant_numeric -> ?variant_position:font_variant_position -> ?weight:font_weight -> ?line_height:line_height -> font_size -> font_family_ list -> system_font
type system_font_name = [
  1. | `Caption
  2. | `Icon
  3. | `Menu
  4. | `Message_box
  5. | `Small_caption
  6. | `Status_bar
]
val system_font_names : system_font_name list
module Sys_font_map : sig ... end
val system_fonts_r : system_font Sys_font_map.t Stdlib.ref
val set_system_font : Sys_font_map.key -> system_font -> unit
val get_system_font : Sys_font_map.key -> system_font option
val font_variant_css2 : [> `Normal | `Small_caps ] list
val font_stretch_css3 : font_stretch_kw list
type justify_content_kw = [
  1. | `Normal
]
val justify_content_kws : justify_content_kw list
type justify_content = [
  1. | justify_content_kw
  2. | content_distribution
  3. | content_position_lr
  4. | `Safe_pos_lr of content_position_lr
  5. | `Unsafe_pos_lr of content_position_lr
]
val string_of_justify_content : justify_content -> string
val pp_justify_content : Stdlib.Format.formatter -> justify_content -> unit
type height = size
val string_of_height : size -> string
val pp_height : Stdlib.Format.formatter -> size -> unit
type justify_items_kw = [
  1. | `Normal
  2. | `Stretch
  3. | `Legacy
]
val justify_items_kws : justify_items_kw list
type justify_items = [
  1. | baseline_position
  2. | self_position_lr
  3. | `Safe_self_pos_lr of self_position_lr
  4. | `Unsafe_self_pos_lr of self_position_lr
  5. | `Legacy_lcr of [ `Left | `Center | `Right ]
  6. | justify_items_kw
]
val string_of_justify_items : justify_items -> string
val pp_justify_items : Stdlib.Format.formatter -> justify_items -> unit
type justify_self_kw = [
  1. | `Normal
  2. | `Stretch
  3. | `Auto
]
val justify_self_kws : justify_self_kw list
type justify_self = [
  1. | baseline_position
  2. | self_position_lr
  3. | `Safe_self_pos_lr of self_position_lr
  4. | `Unsafe_self_pos_lr of self_position_lr
  5. | `Legacy_lcr of [ `Left | `Center | `Right ]
  6. | justify_self_kw
]
val string_of_justify_self : justify_self -> string
val pp_justify_self : Stdlib.Format.formatter -> justify_self -> unit
type list_style_image_kw = [
  1. | `None
]
val list_style_image_kws : list_style_image_kw list
type list_style_image = [
  1. | `Image of image
  2. | list_style_image_kw
]
val string_of_list_style_image : list_style_image -> string
val pp_list_style_image : Stdlib.Format.formatter -> list_style_image -> unit
type list_style_position_kw = [
  1. | `Inside
  2. | `Outside
]
val list_style_position_kws : list_style_position_kw list
type list_style_position = list_style_position_kw
val string_of_list_style_position : list_style_position -> string
val pp_list_style_position : Stdlib.Format.formatter -> list_style_position -> unit
type list_style_type_kw = [
  1. | `None
]
val list_style_type_kws : list_style_type_kw list
type list_style_type = [
  1. | list_style_type_kw
  2. | `Ident_ of string
  3. | `String_ of string
  4. | `Symbols_ of string
]
val string_of_list_style_type : list_style_type -> string
val pp_list_style_type : Stdlib.Format.formatter -> list_style_type -> unit
type margin_kw = [
  1. | `Auto
]
val margin_kws : margin_kw list
type margin = [
  1. | margin_kw
  2. | length_percentage
]
val string_of_margin : margin -> string
val pp_margin : Stdlib.Format.formatter -> margin -> unit
type padding = length_percentage
val string_of_padding : padding -> string
val pp_padding : Stdlib.Format.formatter -> padding -> unit
type position_kw = [
  1. | `Static
  2. | `Relative
  3. | `Absolute
  4. | `Sticky
  5. | `Fixed
]
val position_kws : position_kw list
type position = position_kw
val string_of_position : position -> string
val pp_position : Stdlib.Format.formatter -> position -> unit
type text_align_kw = [
  1. | `Start
  2. | `End
  3. | `Left
  4. | `Right
  5. | `Center
  6. | `Justify
  7. | `Justify_all
  8. | `Match_parent
]
val text_align_kws : text_align_kw list
type text_align = text_align_kw
val string_of_text_align : text_align -> string
val pp_text_align : Stdlib.Format.formatter -> text_align -> unit
type text_align_last_kw = [
  1. | `Auto
  2. | `Start
  3. | `End
  4. | `Left
  5. | `Right
  6. | `Center
  7. | `Justify
  8. | `Match_parent
]
val text_align_last_kws : text_align_last_kw list
type text_align_last = text_align_last_kw
val string_of_text_align_last : text_align_last -> string
val pp_text_align_last : Stdlib.Format.formatter -> text_align_last -> unit
type vertical_align_kw = [
  1. | `Baseline
  2. | `Sub
  3. | `Super
  4. | `Top
  5. | `Text_top
  6. | `Middle
  7. | `Bottom
  8. | `Text_bottom
]
val vertical_align_kws : vertical_align_kw list
type vertical_align = [
  1. | vertical_align_kw
  2. | length_percentage
]
val string_of_vertical_align : vertical_align -> string
val pp_vertical_align : Stdlib.Format.formatter -> vertical_align -> unit
type visibility_kw = [
  1. | `Visible
  2. | `Hidden
  3. | `Collapse
]
val visibility_kws : visibility_kw list
type visibility = visibility_kw
val string_of_visibility : visibility -> string
val pp_visibilty : Stdlib.Format.formatter -> visibility -> unit
type white_space_kw = [
  1. | `Normal
  2. | `Nowrap
  3. | `Pre
  4. | `Pre_wrap
  5. | `Pre_line
  6. | `Break_spaces
]
val white_space_kws : white_space_kw list
type white_space = white_space_kw
val string_of_white_space : white_space -> string
val pp_white_space : Stdlib.Format.formatter -> white_space -> unit
type word_spacing_kw = [
  1. | `Normal
]
val word_spacing_kws : word_spacing_kw list
type word_spacing = [
  1. | word_spacing_kw
  2. | `Length of number * length_unit
]
val string_of_word_spacing : word_spacing -> string
val pp_word_spacing : Stdlib.Format.formatter -> word_spacing -> unit