package css

  1. Overview
  2. Docs

Statements.

val pp_list : string -> (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'b 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
  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 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 'ns rule_ = {
  1. sel : 'ns selector T.with_loc list;
  2. decls : P.binding list;
  3. subs : 'ns rule list;
}
and 'ns rule = 'ns 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) -> 'b single_selector -> string
val string_of_selector : ('a qname -> string) -> 'b selector -> string
val string_of_selector_ : ('a qname -> string) -> ('b selector * 'c) -> string
val string_of_pseudo_class : ('a qname -> string) -> 'b 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 -> 'b rule_ -> unit
val pp_rule : ('a qname -> string) -> Stdlib.Format.formatter -> 'b rule -> unit
type media_condition = string
val pp_media_cond : Stdlib.Format.formatter -> string -> 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 Iri.t * layer_name option * import_conditions option
  3. | Layer of layer_name list * 'ns statement list
  4. | Media of media_condition * 'ns statement list
  5. | Namespace of string option * Iri.t
  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 -> 'b at_rule_ -> unit
val pp_at_rule : ('a qname -> string) -> Stdlib.Format.formatter -> 'b at_rule -> unit
val pp_statement : ('a qname -> string) -> Stdlib.Format.formatter -> 'b statement -> unit
val pp_statement_list : ('a qname -> string) -> Stdlib.Format.formatter -> 'b 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 * 'b
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