Tailwind classes in OCaml
at main 1.4 kB view raw
1(** Color system supporting Tailwind's color palette *) 2 3(** Represents a color value *) 4type t 5 6(** Opacity values *) 7type opacity = [ `Alpha of int (** Alpha value 0-100 *) 8 | `Fraction of int * int (** Fractional opacity like 1/2 *) ] 9 10(** Color intensity variants *) 11type variant = [ `V50 | `V100 | `V200 | `V300 | `V400 | `V500 12 | `V600 | `V700 | `V800 | `V900 | `V950 ] 13 14(** Base color names *) 15type base = [ `Slate | `Gray | `Zinc | `Neutral | `Stone 16 | `Red | `Orange | `Amber | `Yellow | `Lime | `Green 17 | `Emerald | `Teal | `Cyan | `Sky | `Blue | `Indigo 18 | `Violet | `Purple | `Fuchsia | `Pink | `Rose 19 | `Black | `White | `Transparent | `Current | `Inherit ] 20 21(** Create a color *) 22val make : base -> ?variant:variant -> ?opacity:opacity -> unit -> t 23 24(** Generate text color class *) 25val text : t -> Css.t 26 27(** Generate background color class *) 28val bg : t -> Css.t 29 30(** Generate border color class *) 31val border : t -> Css.t 32 33(** Generate ring color class *) 34val ring : t -> Css.t 35 36(** Generate outline color class *) 37val outline : t -> Css.t 38 39(** Generate fill color class (for SVG) *) 40val fill : t -> Css.t 41 42(** Generate stroke color class (for SVG) *) 43val stroke : t -> Css.t 44 45(** Common color constructors *) 46val black : t 47val white : t 48val transparent : t 49val current : t