type font_family = [ `Sans | `Serif | `Mono ] type font_size = [ `Xs | `Sm | `Base | `Lg | `Xl | `Xl2 | `Xl3 | `Xl4 | `Xl5 | `Xl6 | `Xl7 | `Xl8 | `Xl9 ] type font_weight = [ `Thin | `Extralight | `Light | `Normal | `Medium | `Semibold | `Bold | `Extrabold | `Black ] type font_style = [ `Italic | `Not_italic ] type letter_spacing = [ `Tighter | `Tight | `Normal | `Wide | `Wider | `Widest ] type line_height = [ `None | `Tight | `Snug | `Normal | `Relaxed | `Loose | `Rem of float ] type text_align = [ `Left | `Center | `Right | `Justify | `Start | `End ] type text_decoration = [ `Underline | `Overline | `Line_through | `No_underline ] type text_transform = [ `Uppercase | `Lowercase | `Capitalize | `Normal_case ] type t = [ | `Font_family of font_family | `Font_size of font_size | `Font_weight of font_weight | `Font_style of font_style | `Letter_spacing of letter_spacing | `Line_height of line_height | `Text_align of text_align | `Text_decoration of text_decoration | `Text_transform of text_transform | `Text_color of Color.t ] let to_class = function | `Font_family `Sans -> Css.make "font-sans" | `Font_family `Serif -> Css.make "font-serif" | `Font_family `Mono -> Css.make "font-mono" | `Font_size `Xs -> Css.make "text-xs" | `Font_size `Sm -> Css.make "text-sm" | `Font_size `Base -> Css.make "text-base" | `Font_size `Lg -> Css.make "text-lg" | `Font_size `Xl -> Css.make "text-xl" | `Font_size `Xl2 -> Css.make "text-2xl" | `Font_size `Xl3 -> Css.make "text-3xl" | `Font_size `Xl4 -> Css.make "text-4xl" | `Font_size `Xl5 -> Css.make "text-5xl" | `Font_size `Xl6 -> Css.make "text-6xl" | `Font_size `Xl7 -> Css.make "text-7xl" | `Font_size `Xl8 -> Css.make "text-8xl" | `Font_size `Xl9 -> Css.make "text-9xl" | `Font_weight `Thin -> Css.make "font-thin" | `Font_weight `Extralight -> Css.make "font-extralight" | `Font_weight `Light -> Css.make "font-light" | `Font_weight `Normal -> Css.make "font-normal" | `Font_weight `Medium -> Css.make "font-medium" | `Font_weight `Semibold -> Css.make "font-semibold" | `Font_weight `Bold -> Css.make "font-bold" | `Font_weight `Extrabold -> Css.make "font-extrabold" | `Font_weight `Black -> Css.make "font-black" | `Font_style `Italic -> Css.make "italic" | `Font_style `Not_italic -> Css.make "not-italic" | `Letter_spacing `Tighter -> Css.make "tracking-tighter" | `Letter_spacing `Tight -> Css.make "tracking-tight" | `Letter_spacing `Normal -> Css.make "tracking-normal" | `Letter_spacing `Wide -> Css.make "tracking-wide" | `Letter_spacing `Wider -> Css.make "tracking-wider" | `Letter_spacing `Widest -> Css.make "tracking-widest" | `Line_height `None -> Css.make "leading-none" | `Line_height `Tight -> Css.make "leading-tight" | `Line_height `Snug -> Css.make "leading-snug" | `Line_height `Normal -> Css.make "leading-normal" | `Line_height `Relaxed -> Css.make "leading-relaxed" | `Line_height `Loose -> Css.make "leading-loose" | `Line_height (`Rem f) -> Css.make (Printf.sprintf "leading-[%.1frem]" f) | `Text_align `Left -> Css.make "text-left" | `Text_align `Center -> Css.make "text-center" | `Text_align `Right -> Css.make "text-right" | `Text_align `Justify -> Css.make "text-justify" | `Text_align `Start -> Css.make "text-start" | `Text_align `End -> Css.make "text-end" | `Text_decoration `Underline -> Css.make "underline" | `Text_decoration `Overline -> Css.make "overline" | `Text_decoration `Line_through -> Css.make "line-through" | `Text_decoration `No_underline -> Css.make "no-underline" | `Text_transform `Uppercase -> Css.make "uppercase" | `Text_transform `Lowercase -> Css.make "lowercase" | `Text_transform `Capitalize -> Css.make "capitalize" | `Text_transform `Normal_case -> Css.make "normal-case" | `Text_color color -> Color.text color let font_family ff = `Font_family ff let font_size fs = `Font_size fs let font_weight fw = `Font_weight fw let font_style fs = `Font_style fs let letter_spacing ls = `Letter_spacing ls let line_height lh = `Line_height lh let text_align ta = `Text_align ta let text_decoration td = `Text_decoration td let text_transform tt = `Text_transform tt let text_color c = `Text_color c let text_xs = Css.make "text-xs" let text_sm = Css.make "text-sm" let text_base = Css.make "text-base" let text_lg = Css.make "text-lg" let text_xl = Css.make "text-xl" let font_bold = Css.make "font-bold" let font_normal = Css.make "font-normal" let italic = Css.make "italic" let underline = Css.make "underline" let uppercase = Css.make "uppercase" let lowercase = Css.make "lowercase" let capitalize = Css.make "capitalize"