Module Css.S

Statements.

val pp_list : string -> (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a list -> unit
type 'a qname = 'a * string
type attr_value_operator =
  1. | Exact
  2. | Exact_list
  3. | Hyphen
  4. | Prefix
  5. | Suffix
  6. | Contain
type attr_value = {
  1. v : string;
  2. op : attr_value_operator;
  3. case_sensitive : bool;
}
type 'ns attr_selector =
  1. | Attr_present of 'ns qname
  2. | Attr_value of 'ns qname * attr_value
type '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
]
and '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;
}
and '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
val pseudo_class_kws : 'a pseudo_class list
val selector_is_empty : 'a single_selector -> bool
type nested_rule_rel = [
  1. | `Add_to_parent
  2. | `Inside
  3. | `Child
  4. | `Adjacent
  5. | `Sibling
]
val string_of_nested_rule_rel : nested_rule_rel -> string
type 'ns rule_ = {
  1. sel : 'ns selector T.with_loc list;
  2. decls : P.binding list;
  3. nested : 'ns nested_rule list;
}
and 'ns rule = 'ns rule_ T.with_loc
and 'ns nested_rule_ = nested_rule_rel * 'ns rule
and 'ns nested_rule = 'ns nested_rule_ T.with_loc
val string_of_attr_value : attr_value -> string
val string_of_attr_selector : ('a qname -> string) -> 'a attr_selector -> string
val string_of_attr_selector_list : ('a qname -> string) -> ('a attr_selector * 'b) list -> string
val string_of_single_selector : ('a qname -> string) -> 'a single_selector -> string
val string_of_selector : ('a qname -> string) -> 'a selector -> string
val string_of_selector_ : ('a qname -> string) -> ('a selector * 'b) -> string
val string_of_pseudo_class : ('a qname -> string) -> 'a pseudo_class -> string
val pseudo_class_of_string : string -> string pseudo_class option
val pp_decl : Stdlib.Format.formatter -> P.binding -> unit
val pp_decls : Stdlib.Format.formatter -> P.binding list -> unit
val pp_rule_ : ('a qname -> string) -> Stdlib.Format.formatter -> 'a rule_ -> unit
val pp_rule : ('a qname -> string) -> Stdlib.Format.formatter -> 'a rule -> unit
val pp_nested_rule : ('a qname -> string) -> Stdlib.Format.formatter -> 'a nested_rule -> unit
type media_type = [
  1. | `All
  2. | `Aural
  3. | `Braille
  4. | `Embossed
  5. | `Handheld
  6. | `Print
  7. | `Projection
  8. | `Screen
  9. | `Speech
  10. | `Tty
  11. | `Tv
]
val media_types : [> `All | `Aural | `Braille | `Embossed | `Handheld | `Print | `Projection | `Screen | `Speech | `Tty | `Tv ] list
val string_of_media_type : media_type -> string
val pp_media_type : Stdlib.Format.formatter -> media_type -> unit
type media_feature_name = string T.with_loc
type 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
]
val string_of_media_feature_value : [< `Dim of float * T.dim_unit | `Ident of string * 'a | `Number of float | `Ratio of float * float ] -> string
val 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
type media_feature_constraint = [
  1. | `Present
  2. | `Value of media_feature_value
  3. | `Range of media_feature_range
]
val string_of_media_feature : media_feature -> string
val pp_media_feature : Stdlib.Format.formatter -> media_feature -> unit
val get_min_max : string -> [> `Max of string | `Min of string ] option
val 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
type 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
]
val string_of_media_condition : ([< `And of 'a * 'a | `Feature of media_feature | `Not of 'a | `Or of 'a * 'a Feature ] as 'a) -> string
type media_query = {
  1. negated : bool;
  2. media_type : media_type option;
  3. media_condition : media_condition option;
}
val string_of_media_query : media_query -> string
val pp_media_query : Stdlib.Format.formatter -> media_query -> unit
val pp_media_query_list : Stdlib.Format.formatter -> media_query list -> unit
type import_conditions = unit
type layer_name = string list
val pp_layer_name : Stdlib.Format.formatter -> string list -> unit
val pp_layer_names : Stdlib.Format.formatter -> string list list -> unit
type '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
and 'ns at_rule = 'ns at_rule_ * T.loc
and 'ns statement =
  1. | Rule of 'ns rule
  2. | At_rule of 'ns at_rule
val pp_at_rule_ : ('a qname -> string) -> Stdlib.Format.formatter -> 'a at_rule_ -> unit
val pp_at_rule : ('a qname -> string) -> Stdlib.Format.formatter -> 'a at_rule -> unit
val pp_statement : ('a qname -> string) -> Stdlib.Format.formatter -> 'a statement -> unit
val pp_statement_list : ('a qname -> string) -> Stdlib.Format.formatter -> 'a statement list -> unit
module Smap = T.Smap
val empty_iri : Iri.t
val expand_qname : ?all:bool -> Iri.t Smap.t -> T.loc -> (Smap.key * 'a) -> Iri.t * 'a
val expand_attr_selector : Iri.t Smap.t -> T.loc -> Smap.key attr_selector -> Iri.t attr_selector
val expand_pseudo_class : Iri.t Smap.t -> Smap.key pseudo_class -> Iri.t pseudo_class
val expand_single_selector : Iri.t Smap.t -> Smap.key single_selector -> Iri.t single_selector
val expand_selector : Iri.t Smap.t -> Smap.key selector -> Iri.t selector
val expand_rule : Iri.t Smap.t -> Smap.key rule_ -> Iri.t rule_
val html_ns_iri : Iri.t
val math_ns : string * Iri.t
val svg_ns : string * Iri.t
val 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".
val expand_at_rule : Iri.t Smap.t -> Smap.key at_rule_ -> Iri.t Smap.t * Iri.t at_rule_
val expand_statement : Iri.t Smap.t -> Smap.key statement -> Iri.t Smap.t * Iri.t statement
val expand_statement_list : ?ns:Iri.t Smap.t -> Smap.key statement list -> Iri.t statement list
val expand_nested : 'a statement list -> 'a statement list