package css

  1. Overview
  2. Docs

Module Css.SSource

Statements.

Sourceval pp_list : string -> (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a list -> unit
Sourcetype 'a qname = 'a * string
Sourcetype attr_value_operator =
  1. | Exact
  2. | Exact_list
  3. | Hyphen
  4. | Prefix
  5. | Suffix
  6. | Contain
Sourcetype attr_value = {
  1. v : string;
  2. op : attr_value_operator;
  3. case_sensitive : bool;
}
Sourcetype 'ns attr_selector =
  1. | Attr_present of 'ns qname
  2. | Attr_value of 'ns qname * attr_value
Sourcetype 'ns pseudo_class = [
  1. | `Active
  2. | `Default
  3. | `Disabled
  4. | `Empty
  5. | `Enabled
  6. | `First_child
  7. | `First_of_type
  8. | `Focus
  9. | `Fullscreen
  10. | `Hover
  11. | `In_range
  12. | `Indeterminate
  13. | `Invalid
  14. | `Lang of string
  15. | `Last_child
  16. | `Last_of_type
  17. | `Not of 'ns selector
  18. | `Nth_child of int
  19. | `Nth_last_child of int
  20. | `Nth_last_of_type
  21. | `Nth_of_type of int
  22. | `Only_of_type
  23. | `Only_child
  24. | `Optional
  25. | `Out_of_range
  26. | `Read_only
  27. | `Read_write
  28. | `Required
  29. | `Root
  30. | `Target
  31. | `Valid
  32. | `Visited
  33. | `Other of string
]
Sourceand 'ns single_selector = {
  1. sel_qname : 'ns qname T.with_loc option;
  2. sel_attr : 'ns attr_selector T.with_loc list;
  3. sel_id : string T.with_loc option;
  4. sel_pseudo_class : 'ns pseudo_class T.with_loc list;
  5. sel_pseudo_elt : (string * string option) T.with_loc option;
}
Sourceand 'ns selector =
  1. | Single of 'ns single_selector
  2. | Inside of 'ns selector * 'ns single_selector
  3. | Child of 'ns selector * 'ns single_selector
  4. | Adjacent of 'ns selector * 'ns single_selector
  5. | Sibling of 'ns selector * 'ns single_selector
Sourceval pseudo_class_kws : 'a pseudo_class list
Sourceval selector_is_empty : 'a single_selector -> bool
Sourcetype nested_rule_rel = [
  1. | `Add_to_parent
  2. | `Inside
  3. | `Child
  4. | `Adjacent
  5. | `Sibling
]
Sourceval string_of_nested_rule_rel : nested_rule_rel -> string
Sourcetype 'ns rule_ = {
  1. sel : 'ns selector T.with_loc list;
  2. decls : P.binding list;
  3. nested : 'ns nested_rule list;
}
Sourceand 'ns rule = 'ns rule_ T.with_loc
Sourceand 'ns nested_rule_ = nested_rule_rel * 'ns rule
Sourceand 'ns nested_rule = 'ns nested_rule_ T.with_loc
Sourceval string_of_attr_value : attr_value -> string
Sourceval string_of_attr_selector : ('a qname -> string) -> 'a attr_selector -> string
Sourceval string_of_attr_selector_list : ('a qname -> string) -> ('a attr_selector * 'b) list -> string
Sourceval string_of_single_selector : ('a qname -> string) -> 'a single_selector -> string
Sourceval string_of_selector : ('a qname -> string) -> 'a selector -> string
Sourceval string_of_selector_ : ('a qname -> string) -> ('a selector * 'b) -> string
Sourceval string_of_pseudo_class : ('a qname -> string) -> 'a pseudo_class -> string
Sourceval pseudo_class_of_string : string -> string pseudo_class option
Sourceval pp_decl : Format.formatter -> P.binding -> unit
Sourceval pp_decls : Format.formatter -> P.binding list -> unit
Sourceval pp_rule_ : ('a qname -> string) -> Format.formatter -> 'a rule_ -> unit
Sourceval pp_rule : ('a qname -> string) -> Format.formatter -> 'a rule -> unit
Sourceval pp_nested_rule : ('a qname -> string) -> Format.formatter -> 'a nested_rule -> unit
Sourcetype media_type = [
  1. | `All
  2. | `Aural
  3. | `Braille
  4. | `Embossed
  5. | `Handheld
  6. | `Print
  7. | `Projection
  8. | `Screen
  9. | `Speech
  10. | `Tty
  11. | `Tv
]
Sourceval media_types : [> `All | `Aural | `Braille | `Embossed | `Handheld | `Print | `Projection | `Screen | `Speech | `Tty | `Tv ] list
Sourceval string_of_media_type : media_type -> string
Sourceval pp_media_type : Format.formatter -> media_type -> unit
Sourcetype media_feature_name = string T.with_loc
Sourcetype media_feature_value = [
  1. | `Number of T.number
  2. | `Dim of T.dimension
  3. | `Ident of string T.with_loc
  4. | `Ratio of T.ratio
]
Sourceval string_of_media_feature_value : [< `Dim of float * T.dim_unit | `Ident of string * 'a | `Number of float | `Ratio of float * float ] -> string
Sourceval string_of_media_feature_range : string -> [< `Gt of [< `Dim of float * T.dim_unit | `Ident of string * 'a | `Number of float | `Ratio of float * float ] | `Gt_lt of [< `Dim of float * T.dim_unit | `Ident of string * 'b | `Number of float | `Ratio of float * float ] * [< `Dim of float * T.dim_unit | `Ident of string * 'c | `Number of float | `Ratio of float * float ] | `Gt_lte of [< `Dim of float * T.dim_unit | `Ident of string * 'd | `Number of float | `Ratio of float * float ] * [< `Dim of float * T.dim_unit | `Ident of string * 'e | `Number of float | `Ratio of float * float ] | `Gte of [< `Dim of float * T.dim_unit | `Ident of string * 'f | `Number of float | `Ratio of float * float ] | `Gte_lt of [< `Dim of float * T.dim_unit | `Ident of string * 'g | `Number of float | `Ratio of float * float ] * [< `Dim of float * T.dim_unit | `Ident of string * 'h | `Number of float | `Ratio of float * float ] | `Gte_lte of [< `Dim of float * T.dim_unit | `Ident of string * 'i | `Number of float | `Ratio of float * float ] * [< `Dim of float * T.dim_unit | `Ident of string * 'j | `Number of float | `Ratio of float * float ] | `Lt of [< `Dim of float * T.dim_unit | `Ident of string * 'k | `Number of float | `Ratio of float * float ] | `Lte of [< `Dim of float * T.dim_unit | `Ident of string * 'l | `Number of float | `Ratio of float * float ] ] -> string
Sourcetype media_feature_constraint = [
  1. | `Present
  2. | `Value of media_feature_value
  3. | `Range of media_feature_range
]
Sourceval string_of_media_feature : media_feature -> string
Sourceval pp_media_feature : Format.formatter -> media_feature -> unit
Sourceval get_min_max : string -> [> `Max of string | `Min of string ] option
Sourceval media_feature_map_min_max : ((string * 'a) * ([< `Present | `Range of [> `Gte of 'c | `Lte of 'c ] | `Value of 'c Range ] as 'b)) -> (string * 'a) * 'b
Sourcetype media_condition = [
  1. | `Feature of media_feature
  2. | `And of media_condition * media_condition
  3. | `Or of media_condition * media_condition
  4. | `Not of media_condition
]
Sourceval string_of_media_condition : ([< `And of 'a * 'a | `Feature of media_feature | `Not of 'a | `Or of 'a * 'a Feature ] as 'a) -> string
Sourcetype media_query = {
  1. negated : bool;
  2. media_type : media_type option;
  3. media_condition : media_condition option;
}
Sourceval string_of_media_query : media_query -> string
Sourceval pp_media_query : Format.formatter -> media_query -> unit
Sourceval pp_media_query_list : Format.formatter -> media_query list -> unit
Sourcetype import_conditions = unit
Sourcetype layer_name = string list
Sourceval pp_layer_name : Format.formatter -> string list -> unit
Sourceval pp_layer_names : Format.formatter -> string list list -> unit
Sourcetype 'ns at_rule_ =
  1. | Charset of string
  2. | Import of T.url * layer_name option * import_conditions option
  3. | Layer of layer_name list * 'ns statement list
  4. | Media of media_query list * 'ns statement list
  5. | Namespace of string option * T.url
  6. | Other of string
Sourceand 'ns at_rule = 'ns at_rule_ * T.loc
Sourceand 'ns statement =
  1. | Rule of 'ns rule
  2. | At_rule of 'ns at_rule
Sourceval pp_at_rule_ : ('a qname -> string) -> Format.formatter -> 'a at_rule_ -> unit
Sourceval pp_at_rule : ('a qname -> string) -> Format.formatter -> 'a at_rule -> unit
Sourceval pp_statement : ('a qname -> string) -> Format.formatter -> 'a statement -> unit
Sourceval pp_statement_list : ('a qname -> string) -> Format.formatter -> 'a statement list -> unit
Sourcemodule Smap = T.Smap
Sourceval empty_iri : Iri.t
Sourceval expand_qname : ?all:bool -> Iri.t Smap.t -> T.loc -> (Smap.key * 'a) -> Iri.t * 'a
Sourceval expand_attr_selector : Iri.t Smap.t -> T.loc -> Smap.key attr_selector -> Iri.t attr_selector
Sourceval expand_pseudo_class : Iri.t Smap.t -> Smap.key pseudo_class -> Iri.t pseudo_class
Sourceval expand_single_selector : Iri.t Smap.t -> Smap.key single_selector -> Iri.t single_selector
Sourceval expand_selector : Iri.t Smap.t -> Smap.key selector -> Iri.t selector
Sourceval expand_rule : Iri.t Smap.t -> Smap.key rule_ -> Iri.t rule_
Sourceval html_ns_iri : Iri.t
Sourceval math_ns : string * Iri.t
Sourceval svg_ns : string * Iri.t
Sourceval default_ns : Iri.t Smap.t

Default namespaces used when expanding namespaces in CSS. These consist in:

  • "" mapped to "http://www.w3.org/1999/xhtml",
  • "math" mapped to "http://www.w3.org/1998/Math/MathML",
  • "svg" mapped to "http://www.w3.org/2000/svg".
Sourceval expand_statement_list : ?ns:Iri.t Smap.t -> Smap.key statement list -> Iri.t statement list
Sourceval expand_nested : 'a statement list -> 'a statement list