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(** Container query sizes *)
15type container_size =
16 | Xs (** 20rem *)
17 | Sm (** 24rem *)
18 | Md (** 28rem *)
19 | Lg (** 32rem *)
20 | Xl (** 36rem *)
21 | Xl2 (** 42rem *)
22 | Xl3 (** 48rem *)
23 | Xl4 (** 56rem *)
24 | Xl5 (** 64rem *)
25 | Xl6 (** 72rem *)
26 | Xl7 (** 80rem *)
27
28(** Media features *)
29type media_feature =
30 | Dark
31 | Light
32 | Motion_safe
33 | Motion_reduce
34 | Contrast_more
35 | Contrast_less
36 | Portrait
37 | Landscape
38 | Print
39 | Screen
40
41(** Apply classes at a breakpoint *)
42val at_breakpoint : breakpoint -> Css.t -> t
43
44(** Apply classes up to a breakpoint *)
45val max_breakpoint : breakpoint -> Css.t -> t
46
47(** Apply classes at a container query size *)
48val at_container : container_size -> Css.t -> t
49
50(** Apply classes for a media feature *)
51val media : media_feature -> Css.t -> t
52
53(** Container utilities *)
54val container : [`Normal | `Size | `Inline_size] option -> t
55
56(** Convert to CSS class *)
57val to_class : t -> Css.t
58
59(** Apply responsive modifier to classes *)
60val apply : t -> Css.t -> Css.t