Tailwind classes in OCaml
1(** Visual effects: borders, shadows, opacity, transforms *) 2 3(** Effects configuration *) 4type t 5 6(** Border width *) 7type border_width = [ 8 | `None | `Px | `Px2 | `Px4 | `Px8 9] 10 11(** Border style *) 12type border_style = [ 13 | `Solid | `Dashed | `Dotted | `Double | `Hidden | `None 14] 15 16(** Border radius *) 17type border_radius = [ 18 | `None | `Sm | `Base | `Md | `Lg | `Xl | `Xl2 | `Xl3 | `Full 19] 20 21(** Shadow size *) 22type shadow = [ 23 | `None | `Sm | `Base | `Md | `Lg | `Xl | `Xl2 | `Inner 24] 25 26(** Opacity level *) 27type opacity = int (** 0-100 *) 28 29(** Transform origin *) 30type transform_origin = [ 31 | `Center | `Top | `Top_right | `Right | `Bottom_right 32 | `Bottom | `Bottom_left | `Left | `Top_left 33] 34 35(** Set border width *) 36val border_width : [`All | `X | `Y | `Top | `Right | `Bottom | `Left] -> border_width -> t 37 38(** Set border style *) 39val border_style : border_style -> t 40 41(** Set border color *) 42val border_color : Color.t -> t 43 44(** Set border radius *) 45val rounded : [`All | `Top | `Right | `Bottom | `Left | `Tl | `Tr | `Br | `Bl] -> border_radius -> t 46 47(** Set box shadow *) 48val shadow : shadow -> t 49 50(** Set opacity *) 51val opacity : opacity -> t 52 53(** Set backdrop blur *) 54val backdrop_blur : [`None | `Sm | `Base | `Md | `Lg | `Xl | `Xl2 | `Xl3] -> t 55 56(** Set transform *) 57val transform : [`None | `Gpu] -> t 58 59(** Set transform origin *) 60val transform_origin : transform_origin -> t 61 62(** Set scale (percentage) *) 63val scale : [`All | `X | `Y] -> int -> t 64 65(** Set rotate (degrees) *) 66val rotate : int -> t 67 68(** Set translate *) 69val translate : [`X | `Y] -> Size.t -> t 70 71(** Convert to CSS class *) 72val to_class : t -> Css.t 73 74(** Common border utilities *) 75val border : Css.t 76val border_2 : Css.t 77val border_4 : Css.t 78val rounded_sm : Css.t 79val rounded_md : Css.t 80val rounded_lg : Css.t 81val rounded_full : Css.t 82val shadow_sm : Css.t 83val shadow_md : Css.t 84val shadow_lg : Css.t 85 86(** Animation and transition utilities *) 87 88(** Transition properties *) 89type transition_property = [ 90 | `None | `All | `Colors | `Opacity | `Shadow | `Transform 91] 92 93(** Timing functions *) 94type timing_function = [ 95 | `Linear | `In | `Out | `In_out 96] 97 98(** Transition utilities *) 99val transition : transition_property -> Css.t 100 101(** Duration utilities (in ms) *) 102val duration : int -> Css.t 103 104(** Ease timing functions *) 105val ease : timing_function -> Css.t