Tailwind classes in OCaml
1(** Responsive design utilities *)
2
3(** Responsive modifier *)
4type t
5
6(** Breakpoint sizes *)
7type breakpoint = [
8 | `Sm (** 640px *)
9 | `Md (** 768px *)
10 | `Lg (** 1024px *)
11 | `Xl (** 1280px *)
12 | `Xl2 (** 1536px *)
13]
14
15(** Container query sizes *)
16type container_size = [
17 | `Xs (** 20rem *)
18 | `Sm (** 24rem *)
19 | `Md (** 28rem *)
20 | `Lg (** 32rem *)
21 | `Xl (** 36rem *)
22 | `Xl2 (** 42rem *)
23 | `Xl3 (** 48rem *)
24 | `Xl4 (** 56rem *)
25 | `Xl5 (** 64rem *)
26 | `Xl6 (** 72rem *)
27 | `Xl7 (** 80rem *)
28]
29
30(** Media features *)
31type media_feature = [
32 | `Dark
33 | `Light
34 | `Motion_safe
35 | `Motion_reduce
36 | `Contrast_more
37 | `Contrast_less
38 | `Portrait
39 | `Landscape
40 | `Print
41 | `Screen
42]
43
44(** Apply classes at a breakpoint *)
45val at_breakpoint : breakpoint -> Css.t -> t
46
47(** Apply classes up to a breakpoint *)
48val max_breakpoint : breakpoint -> Css.t -> t
49
50(** Apply classes at a container query size *)
51val at_container : container_size -> Css.t -> t
52
53(** Apply classes for a media feature *)
54val media : media_feature -> Css.t -> t
55
56(** Container utilities *)
57val container : [`Normal | `Size | `Inline_size] option -> t
58
59(** Convert to CSS class *)
60val to_class : t -> Css.t
61
62(** Apply responsive modifier to classes *)
63val apply : t -> Css.t -> Css.t