takumi 1.0.11

Render UI component trees to images.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
use phf::phf_map;

use crate::layout::style::{
  tw::{TailwindProperty, TailwindPropertyParser, parser::*},
  *,
};

/// Enum for data-driven property parsing
#[derive(Clone, Copy)]
pub enum PropertyParser {
  ObjectFit(fn(ObjectFit) -> TailwindProperty),
  ObjectPosition(fn(ObjectPosition) -> TailwindProperty),
  BgPosition(fn(BackgroundPosition) -> TailwindProperty),
  TransformOrigin(fn(TransformOrigin) -> TailwindProperty),
  BgSize(fn(BackgroundSize) -> TailwindProperty),
  BgImage(fn(BackgroundImage) -> TailwindProperty),
  LengthAuto(fn(Length) -> TailwindProperty),
  LengthZero(fn(LengthDefaultsToZero) -> TailwindProperty),
  FontWeight(fn(FontWeight) -> TailwindProperty),
  Justify(fn(JustifyContent) -> TailwindProperty),
  Align(fn(AlignItems) -> TailwindProperty),
  Overflow(fn(Overflow) -> TailwindProperty),
  BorderWidth(fn(TwBorderWidth) -> TailwindProperty),
  BorderStyle(fn(BorderStyle) -> TailwindProperty),
  Rounded(fn(TwRounded) -> TailwindProperty),
  GridTemplate(fn(TwGridTemplate) -> TailwindProperty),
  GridAuto(fn(GridTrackSize) -> TailwindProperty),
  GridLine(fn(GridLine) -> TailwindProperty),
  GridPlacement(fn(GridPlacement) -> TailwindProperty),
  GridSpan(fn(GridPlacementSpan) -> TailwindProperty),
  LetterSpacing(fn(TwLetterSpacing) -> TailwindProperty),
  FlexGrow(fn(FlexGrow) -> TailwindProperty),
  Aspect(fn(AspectRatio) -> TailwindProperty),
  TextAlign(fn(TextAlign) -> TailwindProperty),
  TextWrap(fn(TextWrap) -> TailwindProperty),
  ColorCurrent(fn(ColorInput) -> TailwindProperty),
  ColorTransparent(fn(ColorInput<false>) -> TailwindProperty),
  Percentage(fn(PercentageNumber) -> TailwindProperty),
  FontFamily(fn(FontFamily) -> TailwindProperty),
  LineClamp(fn(LineClamp) -> TailwindProperty),
  WhiteSpace(fn(WhiteSpace) -> TailwindProperty),
  OverflowWrap(fn(OverflowWrap) -> TailwindProperty),
  FontSize(fn(TwFontSize) -> TailwindProperty),
  LineHeight(fn(LineHeight) -> TailwindProperty),
  Flex(fn(Flex) -> TailwindProperty),
  Angle(fn(Angle) -> TailwindProperty),
  BackgroundClip(fn(BackgroundClip) -> TailwindProperty),
  Blur(fn(TwBlur) -> TailwindProperty),
  Filter(fn(Filters) -> TailwindProperty),
  BoxShadow(fn(BoxShadow) -> TailwindProperty),
  DropShadow(fn(TextShadow) -> TailwindProperty),
  TextShadow(fn(TextShadow) -> TailwindProperty),
  BlendMode(fn(BlendMode) -> TailwindProperty),
  FontStretch(fn(FontStretch) -> TailwindProperty),
  VerticalAlign(fn(VerticalAlign) -> TailwindProperty),
  DecorationThickness(fn(TextDecorationThickness) -> TailwindProperty),
  Animation(fn(Animations) -> TailwindProperty),
}

impl PropertyParser {
  pub fn parse(&self, suffix: &str) -> Option<TailwindProperty> {
    match self {
      Self::BackgroundClip(f) => BackgroundClip::parse_tw_with_arbitrary(suffix).map(f),
      Self::ObjectFit(f) => ObjectFit::parse_tw_with_arbitrary(suffix).map(f),
      Self::ObjectPosition(f) => ObjectPosition::parse_tw_with_arbitrary(suffix).map(f),
      Self::BgPosition(f) => BackgroundPosition::parse_tw_with_arbitrary(suffix).map(f),
      Self::TransformOrigin(f) => TransformOrigin::parse_tw_with_arbitrary(suffix).map(f),
      Self::BgSize(f) => BackgroundSize::parse_tw_with_arbitrary(suffix).map(f),
      Self::BgImage(f) => BackgroundImage::parse_tw_with_arbitrary(suffix).map(f),
      Self::LengthAuto(f) => Length::parse_tw_with_arbitrary(suffix).map(f),
      Self::LengthZero(f) => Length::parse_tw_with_arbitrary(suffix).map(f),
      Self::FontWeight(f) => FontWeight::parse_tw_with_arbitrary(suffix).map(f),
      Self::Justify(f) => JustifyContent::parse_tw_with_arbitrary(suffix).map(f),
      Self::Align(f) => AlignItems::parse_tw_with_arbitrary(suffix).map(f),
      Self::Overflow(f) => Overflow::parse_tw_with_arbitrary(suffix).map(f),
      Self::BorderWidth(f) => TwBorderWidth::parse_tw_with_arbitrary(suffix).map(f),
      Self::BorderStyle(f) => BorderStyle::parse_tw_with_arbitrary(suffix).map(f),
      Self::Rounded(f) => TwRounded::parse_tw_with_arbitrary(suffix).map(f),
      Self::GridTemplate(f) => TwGridTemplate::parse_tw_with_arbitrary(suffix).map(f),
      Self::GridAuto(f) => GridTrackSize::parse_tw_with_arbitrary(suffix).map(f),
      Self::GridPlacement(f) => GridPlacement::parse_tw_with_arbitrary(suffix).map(f),
      Self::GridLine(f) => GridLine::parse_tw_with_arbitrary(suffix).map(f),
      Self::GridSpan(f) => GridPlacementSpan::parse_tw_with_arbitrary(suffix).map(f),
      Self::LetterSpacing(f) => TwLetterSpacing::parse_tw_with_arbitrary(suffix).map(f),
      Self::FlexGrow(f) => FlexGrow::parse_tw_with_arbitrary(suffix).map(f),
      Self::Aspect(f) => AspectRatio::parse_tw_with_arbitrary(suffix).map(f),
      Self::TextAlign(f) => TextAlign::parse_tw_with_arbitrary(suffix).map(f),
      Self::TextWrap(f) => TextWrap::parse_tw_with_arbitrary(suffix).map(f),
      Self::ColorCurrent(f) => ColorInput::parse_tw_with_arbitrary(suffix).map(f),
      Self::ColorTransparent(f) => ColorInput::parse_tw_with_arbitrary(suffix).map(f),
      Self::Percentage(f) => PercentageNumber::parse_tw_with_arbitrary(suffix).map(f),
      Self::FontFamily(f) => FontFamily::parse_tw_with_arbitrary(suffix).map(f),
      Self::LineClamp(f) => LineClamp::parse_tw_with_arbitrary(suffix).map(f),
      Self::WhiteSpace(f) => WhiteSpace::parse_tw_with_arbitrary(suffix).map(f),
      Self::OverflowWrap(f) => OverflowWrap::parse_tw_with_arbitrary(suffix).map(f),
      Self::FontSize(f) => TwFontSize::parse_tw_with_arbitrary(suffix).map(f),
      Self::LineHeight(f) => LineHeight::parse_tw_with_arbitrary(suffix).map(f),
      Self::Flex(f) => Flex::parse_tw_with_arbitrary(suffix).map(f),
      Self::Angle(f) => Angle::parse_tw_with_arbitrary(suffix).map(f),
      Self::Blur(f) => TwBlur::parse_tw_with_arbitrary(suffix).map(f),
      Self::Filter(f) => Filters::parse_tw_with_arbitrary(suffix).map(f),
      Self::BoxShadow(f) => BoxShadow::parse_tw_with_arbitrary(suffix).map(f),
      Self::DropShadow(f) => TextShadow::parse_tw_with_arbitrary(suffix).map(f),
      Self::TextShadow(f) => TextShadow::parse_tw_with_arbitrary(suffix).map(f),
      Self::BlendMode(f) => BlendMode::parse_tw_with_arbitrary(suffix).map(f),
      Self::FontStretch(f) => FontStretch::parse_tw_with_arbitrary(suffix).map(f),
      Self::VerticalAlign(f) => VerticalAlign::parse_tw_with_arbitrary(suffix).map(f),
      Self::DecorationThickness(f) => {
        TextDecorationThickness::parse_tw_with_arbitrary(suffix).map(f)
      }
      Self::Animation(f) => Animations::parse_tw_with_arbitrary(suffix).map(f),
    }
  }
}

pub static PREFIX_PARSERS: phf::Map<&str, &[PropertyParser]> = phf_map! {
  "object" => &[
    PropertyParser::ObjectFit(TailwindProperty::ObjectFit),
    PropertyParser::ObjectPosition(TailwindProperty::ObjectPosition),
  ],
  "bg" => &[
    PropertyParser::ColorTransparent(TailwindProperty::BackgroundColor),
    PropertyParser::BgImage(TailwindProperty::BackgroundImage),
    PropertyParser::BgPosition(TailwindProperty::BackgroundPosition),
    PropertyParser::BgSize(TailwindProperty::BackgroundSize),
  ],
  "bg-clip" => &[PropertyParser::BackgroundClip(TailwindProperty::BackgroundClip)],
  "bg-linear" => &[PropertyParser::Angle(TailwindProperty::BgLinearAngle)],
  "bg-conic" => &[PropertyParser::Angle(TailwindProperty::BgConicAngle)],
  "from" => &[PropertyParser::ColorCurrent(TailwindProperty::GradientFrom)],
  "to" => &[PropertyParser::ColorCurrent(TailwindProperty::GradientTo)],
  "via" => &[PropertyParser::ColorCurrent(TailwindProperty::GradientVia)],
  "bg-size" => &[PropertyParser::BgSize(TailwindProperty::BackgroundSize)],
  "bg-position" => &[PropertyParser::BgPosition(TailwindProperty::BackgroundPosition)],
  "w" => &[PropertyParser::LengthAuto(TailwindProperty::Width)],
  "h" => &[PropertyParser::LengthAuto(TailwindProperty::Height)],
  "min-w" => &[PropertyParser::LengthAuto(TailwindProperty::MinWidth)],
  "min-h" => &[PropertyParser::LengthAuto(TailwindProperty::MinHeight)],
  "max-w" => &[PropertyParser::LengthAuto(TailwindProperty::MaxWidth)],
  "max-h" => &[PropertyParser::LengthAuto(TailwindProperty::MaxHeight)],
  "size" => &[PropertyParser::LengthAuto(TailwindProperty::Size)],
  "font" => &[
    PropertyParser::FontWeight(TailwindProperty::FontWeight),
    PropertyParser::FontFamily(TailwindProperty::FontFamily),
  ],
  "font-stretch" => &[PropertyParser::FontStretch(TailwindProperty::FontStretch)],
  "gap-x" => &[PropertyParser::LengthZero(TailwindProperty::GapX)],
  "gap-y" => &[PropertyParser::LengthZero(TailwindProperty::GapY)],
  "gap" => &[PropertyParser::LengthZero(TailwindProperty::Gap)],
  "justify" => &[PropertyParser::Justify(TailwindProperty::Justify)],
  "content" => &[PropertyParser::Justify(TailwindProperty::Content)],
  "items" => &[PropertyParser::Align(TailwindProperty::Items)],
  "self" => &[PropertyParser::Align(TailwindProperty::AlignSelf)],
  "justify-self" => &[PropertyParser::Align(TailwindProperty::JustifySelf)],
  "justify-items" => &[PropertyParser::Align(TailwindProperty::JustifyItems)],
  "overflow-x" => &[PropertyParser::Overflow(TailwindProperty::OverflowX)],
  "overflow-y" => &[PropertyParser::Overflow(TailwindProperty::OverflowY)],
  "overflow" => &[PropertyParser::Overflow(TailwindProperty::Overflow)],
  "border" => &[
    PropertyParser::ColorCurrent(TailwindProperty::BorderColor),
    PropertyParser::BorderStyle(TailwindProperty::BorderStyle),
    PropertyParser::BorderWidth(TailwindProperty::BorderWidth),
  ],
  "border-t" => &[PropertyParser::BorderWidth(TailwindProperty::BorderTopWidth)],
  "border-r" => &[PropertyParser::BorderWidth(TailwindProperty::BorderRightWidth)],
  "border-b" => &[PropertyParser::BorderWidth(TailwindProperty::BorderBottomWidth)],
  "border-l" => &[PropertyParser::BorderWidth(TailwindProperty::BorderLeftWidth)],
  "border-x" => &[PropertyParser::BorderWidth(TailwindProperty::BorderXWidth)],
  "border-y" => &[PropertyParser::BorderWidth(TailwindProperty::BorderYWidth)],
  "outline" => &[
    PropertyParser::ColorCurrent(TailwindProperty::OutlineColor),
    PropertyParser::BorderStyle(TailwindProperty::OutlineStyle),
    PropertyParser::BorderWidth(TailwindProperty::OutlineWidth),
  ],
  "shadow" => &[
    PropertyParser::ColorCurrent(TailwindProperty::ShadowColor),
    PropertyParser::BoxShadow(TailwindProperty::Shadow),
  ],
  "outline-offset" => &[PropertyParser::BorderWidth(TailwindProperty::OutlineOffset)],
  "grow" | "flex-grow" => &[PropertyParser::FlexGrow(TailwindProperty::FlexGrow)],
  "shrink" | "flex-shrink" => &[PropertyParser::FlexGrow(TailwindProperty::FlexShrink)],
  "basis" | "flex-basis" => &[PropertyParser::LengthAuto(TailwindProperty::FlexBasis)],
  "aspect" => &[PropertyParser::Aspect(TailwindProperty::Aspect)],
  "text" => &[
    PropertyParser::FontSize(TailwindProperty::FontSize),
    PropertyParser::ColorCurrent(TailwindProperty::Color),
    PropertyParser::TextAlign(TailwindProperty::TextAlign),
    PropertyParser::TextWrap(TailwindProperty::TextWrap),
  ],
  "decoration" => &[
    PropertyParser::ColorCurrent(TailwindProperty::TextDecorationColor),
    PropertyParser::DecorationThickness(TailwindProperty::TextDecorationThickness),
  ],
  "leading" => &[PropertyParser::LineHeight(TailwindProperty::LineHeight)],
  "opacity" => &[PropertyParser::Percentage(TailwindProperty::Opacity)],
  "line-clamp" => &[PropertyParser::LineClamp(TailwindProperty::LineClamp)],
  "whitespace" => &[PropertyParser::WhiteSpace(TailwindProperty::WhiteSpace)],
  "wrap" => &[PropertyParser::OverflowWrap(TailwindProperty::OverflowWrap)],
  "flex" => &[PropertyParser::Flex(TailwindProperty::Flex)],
  "origin" => &[PropertyParser::TransformOrigin(TailwindProperty::TransformOrigin)],
  "translate" => &[PropertyParser::LengthAuto(TailwindProperty::Translate)],
  "rotate" => &[PropertyParser::Angle(TailwindProperty::Rotate)],
  "scale" => &[PropertyParser::Percentage(TailwindProperty::Scale)],
  "scale-x" => &[PropertyParser::Percentage(TailwindProperty::ScaleX)],
  "scale-y" => &[PropertyParser::Percentage(TailwindProperty::ScaleY)],
  "translate-x" => &[PropertyParser::LengthAuto(TailwindProperty::TranslateX)],
  "translate-y" => &[PropertyParser::LengthAuto(TailwindProperty::TranslateY)],
  "m" => &[PropertyParser::LengthZero(TailwindProperty::Margin)],
  "mx" | "ms" => &[PropertyParser::LengthZero(TailwindProperty::MarginX)],
  "my" | "me" => &[PropertyParser::LengthZero(TailwindProperty::MarginY)],
  "mt" => &[PropertyParser::LengthZero(TailwindProperty::MarginTop)],
  "mr" => &[PropertyParser::LengthZero(TailwindProperty::MarginRight)],
  "mb" => &[PropertyParser::LengthZero(TailwindProperty::MarginBottom)],
  "ml" => &[PropertyParser::LengthZero(TailwindProperty::MarginLeft)],
  "p" => &[PropertyParser::LengthZero(TailwindProperty::Padding)],
  "px" | "ps" => &[PropertyParser::LengthZero(TailwindProperty::PaddingX)],
  "py" | "pe" => &[PropertyParser::LengthZero(TailwindProperty::PaddingY)],
  "pt" => &[PropertyParser::LengthZero(TailwindProperty::PaddingTop)],
  "pr" => &[PropertyParser::LengthZero(TailwindProperty::PaddingRight)],
  "pb" => &[PropertyParser::LengthZero(TailwindProperty::PaddingBottom)],
  "pl" => &[PropertyParser::LengthZero(TailwindProperty::PaddingLeft)],
  "inset" => &[PropertyParser::LengthAuto(TailwindProperty::Inset)],
  "inset-x" => &[PropertyParser::LengthAuto(TailwindProperty::InsetX)],
  "inset-y" => &[PropertyParser::LengthAuto(TailwindProperty::InsetY)],
  "top" => &[PropertyParser::LengthAuto(TailwindProperty::Top)],
  "right" => &[PropertyParser::LengthAuto(TailwindProperty::Right)],
  "bottom" => &[PropertyParser::LengthAuto(TailwindProperty::Bottom)],
  "left" => &[PropertyParser::LengthAuto(TailwindProperty::Left)],
  "rounded" => &[PropertyParser::Rounded(TailwindProperty::Rounded)],
  "rounded-t" => &[PropertyParser::Rounded(TailwindProperty::RoundedTop)],
  "rounded-r" => &[PropertyParser::Rounded(TailwindProperty::RoundedRight)],
  "rounded-b" => &[PropertyParser::Rounded(TailwindProperty::RoundedBottom)],
  "rounded-l" => &[PropertyParser::Rounded(TailwindProperty::RoundedLeft)],
  "rounded-tl" => &[PropertyParser::Rounded(TailwindProperty::RoundedTopLeft)],
  "rounded-tr" => &[PropertyParser::Rounded(TailwindProperty::RoundedTopRight)],
  "rounded-br" => &[PropertyParser::Rounded(TailwindProperty::RoundedBottomRight)],
  "rounded-bl" => &[PropertyParser::Rounded(TailwindProperty::RoundedBottomLeft)],
  "grid-cols" => &[PropertyParser::GridTemplate(TailwindProperty::GridTemplateColumns)],
  "grid-rows" => &[PropertyParser::GridTemplate(TailwindProperty::GridTemplateRows)],
  "auto-cols" => &[PropertyParser::GridAuto(TailwindProperty::GridAutoColumns)],
  "auto-rows" => &[PropertyParser::GridAuto(TailwindProperty::GridAutoRows)],
  "col" => &[PropertyParser::GridLine(TailwindProperty::GridColumn)],
  "row" => &[PropertyParser::GridLine(TailwindProperty::GridRow)],
  "col-span" => &[PropertyParser::GridSpan(TailwindProperty::GridColumnSpan)],
  "row-span" => &[PropertyParser::GridSpan(TailwindProperty::GridRowSpan)],
  "col-start" => &[PropertyParser::GridPlacement(TailwindProperty::GridColumnStart)],
  "col-end" => &[PropertyParser::GridPlacement(TailwindProperty::GridColumnEnd)],
  "row-start" => &[PropertyParser::GridPlacement(TailwindProperty::GridRowStart)],
  "row-end" => &[PropertyParser::GridPlacement(TailwindProperty::GridRowEnd)],
  "tracking" => &[PropertyParser::LetterSpacing(TailwindProperty::LetterSpacing)],
  "blur" => &[PropertyParser::Blur(TailwindProperty::Blur)],
  "brightness" => &[PropertyParser::Percentage(TailwindProperty::Brightness)],
  "contrast" => &[PropertyParser::Percentage(TailwindProperty::Contrast)],
  "grayscale" => &[PropertyParser::Percentage(TailwindProperty::Grayscale)],
  "hue-rotate" => &[PropertyParser::Angle(TailwindProperty::HueRotate)],
  "invert" => &[PropertyParser::Percentage(TailwindProperty::Invert)],
  "saturate" => &[PropertyParser::Percentage(TailwindProperty::Saturate)],
  "sepia" => &[PropertyParser::Percentage(TailwindProperty::Sepia)],
  "filter" => &[PropertyParser::Filter(TailwindProperty::Filter)],
  "backdrop-blur" => &[PropertyParser::Blur(TailwindProperty::BackdropBlur)],
  "backdrop-brightness" => &[PropertyParser::Percentage(TailwindProperty::BackdropBrightness)],
  "backdrop-contrast" => &[PropertyParser::Percentage(TailwindProperty::BackdropContrast)],
  "backdrop-grayscale" => &[PropertyParser::Percentage(TailwindProperty::BackdropGrayscale)],
  "backdrop-hue-rotate" => &[PropertyParser::Angle(TailwindProperty::BackdropHueRotate)],
  "backdrop-invert" => &[PropertyParser::Percentage(TailwindProperty::BackdropInvert)],
  "backdrop-opacity" => &[PropertyParser::Percentage(TailwindProperty::BackdropOpacity)],
  "backdrop-saturate" => &[PropertyParser::Percentage(TailwindProperty::BackdropSaturate)],
  "backdrop-sepia" => &[PropertyParser::Percentage(TailwindProperty::BackdropSepia)],
  "backdrop-filter" => &[PropertyParser::Filter(TailwindProperty::BackdropFilter)],
  "drop-shadow" => &[PropertyParser::DropShadow(TailwindProperty::DropShadow)],
  "text-shadow" => &[
    PropertyParser::ColorCurrent(TailwindProperty::TextShadowColor),
    PropertyParser::TextShadow(TailwindProperty::TextShadow),
  ],
  "mix-blend" => &[PropertyParser::BlendMode(TailwindProperty::MixBlendMode)],
  "bg-blend" => &[PropertyParser::BlendMode(TailwindProperty::BackgroundBlendMode)],
  "align" => &[PropertyParser::VerticalAlign(TailwindProperty::VerticalAlign)],
  "animate" => &[PropertyParser::Animation(TailwindProperty::Animation)],
};

pub static FIXED_PROPERTIES: phf::Map<&str, TailwindProperty> = phf_map! {
  "border" => TailwindProperty::BorderDefault,
  "outline" => TailwindProperty::OutlineDefault,
  "box-border" => TailwindProperty::BoxSizing(BoxSizing::BorderBox),
  "box-content" => TailwindProperty::BoxSizing(BoxSizing::ContentBox),
  "inline" => TailwindProperty::Display(Display::Inline),
  "inline-block" => TailwindProperty::Display(Display::InlineBlock),
  "inline-flex" => TailwindProperty::Display(Display::InlineFlex),
  "bg-radial" => TailwindProperty::BgRadial,
  "inline-grid" => TailwindProperty::Display(Display::InlineGrid),
  "block" => TailwindProperty::Display(Display::Block),
  "flex" => TailwindProperty::Display(Display::Flex),
  "grid" => TailwindProperty::Display(Display::Grid),
  "hidden" => TailwindProperty::Display(Display::None),
  "bg-repeat" => TailwindProperty::BackgroundRepeat(BackgroundRepeat::repeat()),
  "bg-no-repeat" => TailwindProperty::BackgroundRepeat(BackgroundRepeat::no_repeat()),
  "bg-space" => TailwindProperty::BackgroundRepeat(BackgroundRepeat::space()),
  "bg-round" => TailwindProperty::BackgroundRepeat(BackgroundRepeat::round()),
  "bg-repeat-x" => TailwindProperty::BackgroundRepeat(BackgroundRepeat(
    BackgroundRepeatStyle::Repeat,
    BackgroundRepeatStyle::NoRepeat,
  )),
  "bg-repeat-y" => TailwindProperty::BackgroundRepeat(BackgroundRepeat(
    BackgroundRepeatStyle::NoRepeat,
    BackgroundRepeatStyle::Repeat,
  )),
  "aspect-auto" => TailwindProperty::Aspect(AspectRatio::Auto),
  "aspect-square" => TailwindProperty::Aspect(AspectRatio::Ratio(1.0)),
  "aspect-video" => TailwindProperty::Aspect(AspectRatio::Ratio(16.0 / 9.0)),
  "flex-grow" | "grow" => TailwindProperty::FlexGrow(FlexGrow(1.0)),
  "flex-shrink" | "shrink" => TailwindProperty::FlexShrink(FlexGrow(1.0)),
  "flex-row" => TailwindProperty::FlexDirection(FlexDirection::Row),
  "flex-row-reverse" => TailwindProperty::FlexDirection(FlexDirection::RowReverse),
  "flex-col" => TailwindProperty::FlexDirection(FlexDirection::Column),
  "flex-col-reverse" => TailwindProperty::FlexDirection(FlexDirection::ColumnReverse),
  "flex-wrap" => TailwindProperty::FlexWrap(FlexWrap::Wrap),
  "flex-wrap-reverse" => TailwindProperty::FlexWrap(FlexWrap::WrapReverse),
  "flex-nowrap" => TailwindProperty::FlexWrap(FlexWrap::NoWrap),
  "flex-auto" => TailwindProperty::Flex(Flex::auto()),
  "flex-initial" => TailwindProperty::Flex(Flex::initial()),
  "flex-none" => TailwindProperty::Flex(Flex::none()),
  "absolute" => TailwindProperty::Position(Position::Absolute),
  "relative" => TailwindProperty::Position(Position::Relative),
  "uppercase" => TailwindProperty::TextTransform(TextTransform::Uppercase),
  "lowercase" => TailwindProperty::TextTransform(TextTransform::Lowercase),
  "capitalize" => TailwindProperty::TextTransform(TextTransform::Capitalize),
  "normal-case" => TailwindProperty::TextTransform(TextTransform::None),
  "underline" => TailwindProperty::TextDecorationLine(TextDecorationLines::UNDERLINE),
  "overline" => TailwindProperty::TextDecorationLine(TextDecorationLines::OVERLINE),
  "line-through" => TailwindProperty::TextDecorationLine(TextDecorationLines::LINE_THROUGH),
  "no-underline" => TailwindProperty::TextDecorationLine(TextDecorationLines::empty()),
  "italic" => TailwindProperty::FontStyle(FontStyle::italic()),
  "not-italic" => TailwindProperty::FontStyle(FontStyle::normal()),
  "w-screen" => TailwindProperty::Width(Length::Vw(100.0)),
  "h-screen" => TailwindProperty::Height(Length::Vh(100.0)),
  "min-w-screen" => TailwindProperty::MinWidth(Length::Vw(100.0)),
  "min-h-screen" => TailwindProperty::MinHeight(Length::Vh(100.0)),
  "max-w-screen" => TailwindProperty::MaxWidth(Length::Vw(100.0)),
  "max-h-screen" => TailwindProperty::MaxHeight(Length::Vh(100.0)),
  "truncate" => TailwindProperty::Truncate,
  "text-ellipsis" => TailwindProperty::TextOverflow(TextOverflow::Ellipsis),
  "text-clip" => TailwindProperty::TextOverflow(TextOverflow::Clip),
  "break-normal" => TailwindProperty::WordBreak(WordBreak::Normal),
  "break-all" => TailwindProperty::WordBreak(WordBreak::BreakAll),
  "break-keep" => TailwindProperty::WordBreak(WordBreak::KeepAll),
  "grid-flow-row" => TailwindProperty::GridAutoFlow(GridAutoFlow::row()),
  "grid-flow-col" => TailwindProperty::GridAutoFlow(GridAutoFlow::column()),
  "grid-flow-row-dense" | "grid-flow-dense" => TailwindProperty::GridAutoFlow(GridAutoFlow::row().dense()),
  "grid-flow-col-dense" => TailwindProperty::GridAutoFlow(GridAutoFlow::column().dense()),
  "col-span-full" => TailwindProperty::GridColumn(GridLine::full()),
  "row-span-full" => TailwindProperty::GridRow(GridLine::full()),
  "col-start-auto" => TailwindProperty::GridColumnStart(GridPlacement::Keyword(GridPlacementKeyword::Auto)),
  "col-end-auto" => TailwindProperty::GridColumnEnd(GridPlacement::Keyword(GridPlacementKeyword::Auto)),
  "row-start-auto" => TailwindProperty::GridRowStart(GridPlacement::Keyword(GridPlacementKeyword::Auto)),
  "row-end-auto" => TailwindProperty::GridRowEnd(GridPlacement::Keyword(GridPlacementKeyword::Auto)),
  "shadow-sm" => TailwindProperty::Shadow(BoxShadow {
    inset: false,
    offset_x: Length::Px(1.0),
    offset_y: Length::Px(1.0),
    blur_radius: Length::Px(1.0),
    spread_radius: Length::Px(0.0),
    color: ColorInput::Value(Color([0, 0, 0, 6])),
  }),
  "shadow" => TailwindProperty::Shadow(BoxShadow {
    inset: false,
    offset_x: Length::Px(1.0),
    offset_y: Length::Px(1.0),
    blur_radius: Length::Px(1.0),
    spread_radius: Length::Px(0.0),
    color: ColorInput::Value(Color([0, 0, 0, 19])),
  }),
  "shadow-md" => TailwindProperty::Shadow(BoxShadow {
    inset: false,
    offset_x: Length::Px(1.0),
    offset_y: Length::Px(1.0),
    blur_radius: Length::Px(3.0),
    spread_radius: Length::Px(0.0),
    color: ColorInput::Value(Color([0, 0, 0, 32])),
  }),
  "shadow-lg" => TailwindProperty::Shadow(BoxShadow {
    inset: false,
    offset_x: Length::Px(1.0),
    offset_y: Length::Px(1.0),
    blur_radius: Length::Px(8.0),
    spread_radius: Length::Px(0.0),
    color: ColorInput::Value(Color([0, 0, 0, 38])),
  }),
  "shadow-xl" => TailwindProperty::Shadow(BoxShadow {
    inset: false,
    offset_x: Length::Px(1.0),
    offset_y: Length::Px(1.0),
    blur_radius: Length::Px(20.0),
    spread_radius: Length::Px(0.0),
    color: ColorInput::Value(Color([0, 0, 0, 48])),
  }),
  "shadow-2xl" => TailwindProperty::Shadow(BoxShadow {
    inset: false,
    offset_x: Length::Px(1.0),
    offset_y: Length::Px(1.0),
    blur_radius: Length::Px(30.0),
    spread_radius: Length::Px(0.0),
    color: ColorInput::Value(Color([0, 0, 0, 64])),
  }),
  "shadow-none" => TailwindProperty::Shadow(BoxShadow {
    inset: false,
    offset_x: Length::Px(0.0),
    offset_y: Length::Px(0.0),
    blur_radius: Length::Px(0.0),
    spread_radius: Length::Px(0.0),
    color: ColorInput::Value(Color([0, 0, 0, 0])),
  }),
  "grayscale" => TailwindProperty::Grayscale(PercentageNumber(1.0)),
  "invert" => TailwindProperty::Invert(PercentageNumber(1.0)),
  "sepia" => TailwindProperty::Sepia(PercentageNumber(1.0)),
  "backdrop-grayscale" => TailwindProperty::BackdropGrayscale(PercentageNumber(1.0)),
  "backdrop-invert" => TailwindProperty::BackdropInvert(PercentageNumber(1.0)),
  "backdrop-sepia" => TailwindProperty::BackdropSepia(PercentageNumber(1.0)),
  "drop-shadow-xs" => TailwindProperty::DropShadow(TextShadow {
    offset_x: Length::Px(0.0),
    offset_y: Length::Px(1.0),
    blur_radius: Length::Px(1.0),
    color: ColorInput::Value(Color([0, 0, 0, 13])),
  }),
  "drop-shadow-sm" => TailwindProperty::DropShadow(TextShadow {
    offset_x: Length::Px(0.0),
    offset_y: Length::Px(1.0),
    blur_radius: Length::Px(2.0),
    color: ColorInput::Value(Color([0, 0, 0, 38])),
  }),
  "drop-shadow" => TailwindProperty::DropShadow(TextShadow {
    offset_x: Length::Px(0.0),
    offset_y: Length::Px(1.0),
    blur_radius: Length::Px(2.0),
    color: ColorInput::Value(Color([0, 0, 0, 26])),
  }),
  "drop-shadow-md" => TailwindProperty::DropShadow(TextShadow {
    offset_x: Length::Px(0.0),
    offset_y: Length::Px(3.0),
    blur_radius: Length::Px(3.0),
    color: ColorInput::Value(Color([0, 0, 0, 31])),
  }),
  "drop-shadow-lg" => TailwindProperty::DropShadow(TextShadow {
    offset_x: Length::Px(0.0),
    offset_y: Length::Px(4.0),
    blur_radius: Length::Px(4.0),
    color: ColorInput::Value(Color([0, 0, 0, 38])),
  }),
  "drop-shadow-xl" => TailwindProperty::DropShadow(TextShadow {
    offset_x: Length::Px(0.0),
    offset_y: Length::Px(9.0),
    blur_radius: Length::Px(7.0),
    color: ColorInput::Value(Color([0, 0, 0, 26])),
  }),
  "drop-shadow-2xl" => TailwindProperty::DropShadow(TextShadow {
    offset_x: Length::Px(0.0),
    offset_y: Length::Px(25.0),
    blur_radius: Length::Px(25.0),
    color: ColorInput::Value(Color([0, 0, 0, 38])),
  }),
  "drop-shadow-none" => TailwindProperty::DropShadow(TextShadow {
    offset_x: Length::Px(0.0),
    offset_y: Length::Px(0.0),
    blur_radius: Length::Px(0.0),
    color: ColorInput::Value(Color([0, 0, 0, 0])),
  }),
  // Inset shadows (--inset-shadow-*)
  "inset-shadow-2xs" => TailwindProperty::Shadow(BoxShadow {
    inset: true,
    offset_x: Length::Px(0.0),
    offset_y: Length::Px(1.0),
    blur_radius: Length::Px(0.0),
    spread_radius: Length::Px(0.0),
    color: ColorInput::Value(Color([0, 0, 0, 13])),
  }),
  "inset-shadow-xs" => TailwindProperty::Shadow(BoxShadow {
    inset: true,
    offset_x: Length::Px(0.0),
    offset_y: Length::Px(1.0),
    blur_radius: Length::Px(1.0),
    spread_radius: Length::Px(0.0),
    color: ColorInput::Value(Color([0, 0, 0, 13])),
  }),
  "inset-shadow-sm" => TailwindProperty::Shadow(BoxShadow {
    inset: true,
    offset_x: Length::Px(0.0),
    offset_y: Length::Px(2.0),
    blur_radius: Length::Px(4.0),
    spread_radius: Length::Px(0.0),
    color: ColorInput::Value(Color([0, 0, 0, 13])),
  }),
  // Text shadows (--text-shadow-*)
  "text-shadow-2xs" => TailwindProperty::TextShadow(TextShadow {
    offset_x: Length::Px(0.0),
    offset_y: Length::Px(1.0),
    blur_radius: Length::Px(0.0),
    color: ColorInput::Value(Color([0, 0, 0, 38])),
  }),
  "text-shadow-xs" => TailwindProperty::TextShadow(TextShadow {
    offset_x: Length::Px(0.0),
    offset_y: Length::Px(1.0),
    blur_radius: Length::Px(1.0),
    color: ColorInput::Value(Color([0, 0, 0, 51])),
  }),
  "text-shadow-sm" => TailwindProperty::TextShadow(TextShadow {
    offset_x: Length::Px(0.0),
    offset_y: Length::Px(1.0),
    blur_radius: Length::Px(2.0),
    color: ColorInput::Value(Color([0, 0, 0, 19])),
  }),
  "text-shadow-md" => TailwindProperty::TextShadow(TextShadow {
    offset_x: Length::Px(0.0),
    offset_y: Length::Px(1.0),
    blur_radius: Length::Px(4.0),
    color: ColorInput::Value(Color([0, 0, 0, 26])),
  }),
  "text-shadow-lg" => TailwindProperty::TextShadow(TextShadow {
    offset_x: Length::Px(0.0),
    offset_y: Length::Px(1.0),
    blur_radius: Length::Px(8.0),
    color: ColorInput::Value(Color([0, 0, 0, 26])),
  }),
  "isolate" => TailwindProperty::Isolation(Isolation::Isolate),
  "isolation-auto" => TailwindProperty::Isolation(Isolation::Auto),
  "visible" => TailwindProperty::Visibility(Visibility::Visible),
  "invisible" => TailwindProperty::Visibility(Visibility::Hidden),
};