Tailwind classes in OCaml
1(** Spacing utilities for padding, margin, gap, and space *)
2
3(** Represents spacing configuration *)
4type t
5
6(** Direction for spacing *)
7type direction = [
8 | `All (** All sides *)
9 | `X (** Horizontal (left and right) *)
10 | `Y (** Vertical (top and bottom) *)
11 | `Top (** Top only *)
12 | `Right (** Right only *)
13 | `Bottom (** Bottom only *)
14 | `Left (** Left only *)
15 | `Start (** Inline start (logical) *)
16 | `End (** Inline end (logical) *)
17]
18
19(** Create padding classes *)
20val padding : direction -> Size.t -> t
21
22(** Create margin classes *)
23val margin : direction -> Size.t -> t
24
25(** Create gap classes for flexbox/grid *)
26val gap : [`All | `X | `Y] -> Size.t -> t
27
28(** Create space-between classes *)
29val space : [`X | `Y] -> Size.t -> t
30
31(** Convert spacing to CSS class *)
32val to_class : t -> Css.t
33
34(** Shorthand constructors *)
35
36(** Padding all sides *)
37val p : Size.t -> t
38
39(** Padding horizontal *)
40val px : Size.t -> t
41
42(** Padding vertical *)
43val py : Size.t -> t
44
45(** Padding top *)
46val pt : Size.t -> t
47
48(** Padding right *)
49val pr : Size.t -> t
50
51(** Padding bottom *)
52val pb : Size.t -> t
53
54(** Padding left *)
55val pl : Size.t -> t
56
57(** Margin all sides *)
58val m : Size.t -> t
59
60(** Margin horizontal *)
61val mx : Size.t -> t
62
63(** Margin vertical *)
64val my : Size.t -> t
65
66(** Margin top *)
67val mt : Size.t -> t
68
69(** Margin right *)
70val mr : Size.t -> t
71
72(** Margin bottom *)
73val mb : Size.t -> t
74
75(** Margin left *)
76val ml : Size.t -> t