Page
Library
Module
Module type
Parameter
Class
Class type
Source
Css.TSourceTypes and base definitions.
mk_pp f creates a formatter -> x -> unit function from the given x -> string function.
string_of_list sep to_string l is String.concat sep (List.map to_string l).
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.
val pos_of_string_at :
?fname:string ->
?from:(int * Lexing.position) ->
string ->
int ->
Lexing.positionpos_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.type ctx = {get_pos : pos Angstrom.t;last_pos : pos Angstrom.t;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.
ctx get_pos builds a new context with the given get_pos functions.
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.
type parse_error = | Unterminated_string| Unterminated_comment| Unterminated_char_escape| Invalid_iri of string * Iri.error| Other of stringParsing errors.
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.
Parsed strings, with a quoted flag indicating whether string is quoted.
type rel_length_unit = [ | `emFont size of the element.
*)| `exx-height of the element's font.
*)| `capCap height (the nominal height of capital letters) of the element's font.
*)| `chAverage character advance of a narrow glyph in the element's font, as represented by the "0" (ZERO, U+0030) glyph.
*)| `icAverage character advance of a full width glyph in the element's font, as represented by the "水" (CJK water ideograph, U+6C34) glyph.
*)| `remFont size of the root element.
*)| `lhLine height of the element.
*)| `rlhLine height of the root element.
*)| `vw1% of viewport's width.
*)| `vh1% of viewport's height.
*)| `vi1% of viewport's size in the root element's inline axis.
*)| `vb1% of viewport's size in the root element's block axis.
*)| `vmin1% of viewport's smaller dimension.
*)| `vmax1% of viewport's larger dimension.
*)| `cqw1% of a query container's width
*)| `cqh1% of a query container's height
*)| `cqi1% of a query container's inline size
*)| `cqb1% of a query container's block size
*)| `cqminThe smaller value of cqi or cqb
*)| `cqmaxThe 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 ]
listtype abs_length_unit = [ | `cmCentimeters 1cm = 96px/2.54
*)| `mmMillimeters 1mm = 1/10th of 1cm
*)| `q| `InInches 1in = 2.54cm = 96px
*)| `pcPicas 1pc = 1/6th of 1in
*)| `ptPoints 1pt = 1/72th of 1in
*)| `pxPixels 1px = 1/96th of 1in
*) ]type angle_unit = [ | `degDegrees There are 360 degrees in a full circle.
*)| `gradGradians There are 400 gradians in a full circle.
*)| `radRadians There are 2__pi__ radians in a full circle.
*)| `turnTurns There is 1 turn in a full circle.
*) ]type system_color = [ | `AccentColorText| `ActiveText| `ButtonBorder| `ButtonFace| `ButtonText| `Canvas| `CanvasText| `Field| `FieldText| `GrayText| `Highlight| `HighlightText| `LinkText| `Mark| `MarkText| `SelectedItem| `SelectedItemText| `VisitedText ]val system_colors :
[> `AccentColorText
| `ActiveText
| `ButtonBorder
| `ButtonFace
| `ButtonText
| `Canvas
| `CanvasText
| `Field
| `FieldText
| `GrayText
| `Highlight
| `HighlightText
| `LinkText
| `Mark
| `MarkText
| `SelectedItem
| `SelectedItemText
| `VisitedText ]
listtype color = [ | `Rgba of float * float * float * float| `Named_color of string| `System_color of system_color| color_kw ]type axis_position = | Single_kw of trblc| XY of x_position_kw axis_pos * y_position_kw axis_posval content_position_lr_kws :
[> `Center | `End | `Flex_end | `Flex_start | `Left | `Right | `Start ] listval self_position_kws :
[> `Center
| `End
| `Flex_end
| `Flex_start
| `Self_end
| `Self_start
| `Start ]
listval self_position_lr_kws :
[> `Center
| `End
| `Flex_end
| `Flex_start
| `Left
| `Right
| `Self_end
| `Self_start
| `Start ]
listval content_distribution_kws :
[> `Space_around | `Space_between | `Space_evenly | `Stretch ] listtype align_content = [ | align_content_kw| baseline_position| content_distribution| content_position| `Safe_pos of content_position| `Unsafe_pos of content_position ]type align_items = [ | baseline_position| self_position| `Safe_self_pos of self_position| `Unsafe_self_pos of self_position| align_items_kw ]type display_internal = [ | `Table_row_group| `Table_header_group| `Table_row| `Table_cell| `Table_column_group| `Table_column| `Table_caption| `Ruby_base| `Ruby_base_container| `Ruby_text| `Ruby_text_container ]val display_legacy_kws :
[> `Inline_block | `Inline_flex | `Inline_grid | `Inline_table ] listtype font_family_generic_kw = [ | `Cursive| `Emoji| `Fantasy| `Fangsong| `Math| `Monospace| `Sans_serif| `Serif| `System_ui| `Ui_monospace| `Ui_rounded| `Ui_sans_serif| `Ui_serif ]type font_size_kw = [ | `Large| `Larger| `Math| `Medium| `Small| `Smaller| `Xxx_large| `Xx_large| `Xx_small| `X_large| `X_small ]type font_stretch_kw = [ | `Normal| `Ultra_condensed| `Extra_condensed| `Semi_condensed| `Condensed| `Ultra_expanded| `Extra_expanded| `Semi_expanded| `Expanded ]type font_variant_alt = [ | `Historical_forms| `Stylistic of string| `Styleset of string list| `Character_variant of string list| `Swash of string| `Ornaments of string| `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 ] ->
stringtype font_variant_east_asian_kw = [ | `Jis78| `Jis83| `Jis90| `Jis04| `Ruby| `Proportional_width| `Simplified| `Traditional| `Full_width ]type font_variant_ligatures_kw = [ | `Common_ligatures| `No_common_ligatures| `Contextual| `No_contextual| `Discretionary_ligatures| `No_discretionary_ligatures| `Historical_ligatures| `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 ]
listtype font_variant_numeric_kw = [ | `Ordinal| `Slashed_zero| `Lining_nums| `Oldstyle_nums| `Proportional_nums| `Tabular_nums| `Diagonal_frations| `Stacked_fractions ]val font_variant_numeric_kws :
[> `Diagonal_frations
| `Lining_nums
| `Oldstyle_nums
| `Ordinal
| `Proportional_nums
| `Slashed_zero
| `Stacked_fractions
| `Tabular_nums ]
listtype system_font = {family : font_family_ list;size : font_size;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;}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_fonttype justify_content = [ | justify_content_kw| content_distribution| content_position_lr| `Safe_pos_lr of content_position_lr| `Unsafe_pos_lr of content_position_lr ]type justify_items = [ | baseline_position| self_position_lr| `Safe_self_pos_lr of self_position_lr| `Unsafe_self_pos_lr of self_position_lr| `Legacy_lcr of [ `Left | `Center | `Right ]| justify_items_kw ]type justify_self = [ | baseline_position| self_position_lr| `Safe_self_pos_lr of self_position_lr| `Unsafe_self_pos_lr of self_position_lr| `Legacy_lcr of [ `Left | `Center | `Right ]| justify_self_kw ]type list_style_type = [ | list_style_type_kw| `Ident_ of string| `String_ of string| `Symbols_ of string ]