use phf::phf_map;
use crate::layout::style::{
tw::{TailwindProperty, TailwindPropertyParser, parser::*},
*,
};
#[derive(Clone, Copy)]
pub enum PropertyParser {
ObjectFit(fn(ObjectFit) -> TailwindProperty),
BgPosition(fn(BackgroundPosition) -> TailwindProperty),
BgSize(fn(BackgroundSize) -> TailwindProperty),
BgImage(fn(BackgroundImage) -> TailwindProperty),
LengthAuto(fn(Length) -> TailwindProperty),
LengthZero(fn(Length<false>) -> 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),
DropShadow(fn(TextShadow) -> TailwindProperty),
TextShadow(fn(TextShadow) -> TailwindProperty),
BlendMode(fn(BlendMode) -> TailwindProperty),
FontStretch(fn(FontStretch) -> TailwindProperty),
VerticalAlign(fn(VerticalAlign) -> TailwindProperty),
DecorationThickness(fn(TextDecorationThickness) -> 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::BgPosition(f) => BackgroundPosition::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::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)
}
}
}
}
pub static PREFIX_PARSERS: phf::Map<&str, &[PropertyParser]> = phf_map! {
"object" => &[
PropertyParser::ObjectFit(TailwindProperty::ObjectFit),
PropertyParser::BgPosition(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),
],
"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::BgPosition(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::TextShadow(TailwindProperty::TextShadow)],
"mix-blend" => &[PropertyParser::BlendMode(TailwindProperty::MixBlendMode)],
"bg-blend" => &[PropertyParser::BlendMode(TailwindProperty::BackgroundBlendMode)],
"align" => &[PropertyParser::VerticalAlign(TailwindProperty::VerticalAlign)],
};
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-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-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),
};