package cascade

  1. Overview
  2. Docs
CSS generation and manipulation library for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

cascade-1.2.0.tbz
sha256=3315f94068943b3655bf530c1d82b68655524ff3601efedfbaf0a7f886fbf5a1
sha512=0f187c8e17fcbddaa0ad2760930956451062e476b678e1e60daf6ad9e7414fad99a2d70534dfdf8bca0a1092e374d009051f06b0ce9da33f2742cdde0187e75c

doc/src/cascade/sort.ml.html

Source file sort.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
type t =
  | Token
  | Component
  | Block
  | Function
  | At_rule
  | Qualified_rule
  | Declaration
  | Selector
  | Property_value
  | Stylesheet

(* A closed enum with no payloads, so structural equality is its equality. *)
let equal (a : t) (b : t) = a = b

let pp : t Pp.t =
 fun ctx t ->
  let s =
    match t with
    | Token -> "token"
    | Component -> "component"
    | Block -> "block"
    | Function -> "function"
    | At_rule -> "at-rule"
    | Qualified_rule -> "qualified-rule"
    | Declaration -> "declaration"
    | Selector -> "selector"
    | Property_value -> "property-value"
    | Stylesheet -> "stylesheet"
  in
  Pp.string ctx s

let to_string t = Pp.to_string pp t