leptos-css 0.1.1

Typed CSS values, dimensions, and property names for Leptos
Documentation
//! Canonical CSS property names.

macro_rules! property_names {
    ($($variant:ident => $css_name:literal),+ $(,)?) => {
        /// A non-exhaustive catalog of canonical CSS property names.
        ///
        /// Each variant maps to its kebab-case CSS spelling through [`PropertyName::as_str`].
        /// The catalog is deliberately independent from the narrower checked-selector surface.
        #[allow(missing_docs)]
        #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
        #[non_exhaustive]
        pub enum PropertyName {
            $($variant),+
        }

        impl PropertyName {
            /// Return the canonical kebab-case CSS spelling.
            #[must_use]
            pub const fn as_str(&self) -> &'static str {
                match self {
                    $(Self::$variant => $css_name),+
                }
            }
        }
    };
}

property_names! {
    AlignContent => "align-content",
    AlignItems => "align-items",
    AlignSelf => "align-self",
    All => "all",
    Animation => "animation",
    AnimationDelay => "animation-delay",
    AnimationDirection => "animation-direction",
    AnimationDuration => "animation-duration",
    AnimationFillMode => "animation-fill-mode",
    AnimationIterationCount => "animation-iteration-count",
    AnimationName => "animation-name",
    AnimationPlayState => "animation-play-state",
    AnimationTimingFunction => "animation-timing-function",
    Appearance => "appearance",
    AspectRatio => "aspect-ratio",
    BackdropFilter => "backdrop-filter",
    BackfaceVisibility => "backface-visibility",
    Background => "background",
    BackgroundAttachment => "background-attachment",
    BackgroundBlendMode => "background-blend-mode",
    BackgroundClip => "background-clip",
    BackgroundColor => "background-color",
    BackgroundImage => "background-image",
    BackgroundOrigin => "background-origin",
    BackgroundPosition => "background-position",
    BackgroundRepeat => "background-repeat",
    BackgroundSize => "background-size",
    BlockSize => "block-size",
    Border => "border",
    BorderBlock => "border-block",
    BorderBlockColor => "border-block-color",
    BorderBlockEnd => "border-block-end",
    BorderBlockEndColor => "border-block-end-color",
    BorderBlockEndStyle => "border-block-end-style",
    BorderBlockEndWidth => "border-block-end-width",
    BorderBlockStart => "border-block-start",
    BorderBlockStartColor => "border-block-start-color",
    BorderBlockStartStyle => "border-block-start-style",
    BorderBlockStartWidth => "border-block-start-width",
    BorderBlockStyle => "border-block-style",
    BorderBlockWidth => "border-block-width",
    BorderBottom => "border-bottom",
    BorderBottomColor => "border-bottom-color",
    BorderBottomLeftRadius => "border-bottom-left-radius",
    BorderBottomRightRadius => "border-bottom-right-radius",
    BorderBottomStyle => "border-bottom-style",
    BorderBottomWidth => "border-bottom-width",
    BorderCollapse => "border-collapse",
    BorderColor => "border-color",
    BorderEndEndRadius => "border-end-end-radius",
    BorderEndStartRadius => "border-end-start-radius",
    BorderImage => "border-image",
    BorderImageOutset => "border-image-outset",
    BorderImageRepeat => "border-image-repeat",
    BorderImageSlice => "border-image-slice",
    BorderImageSource => "border-image-source",
    BorderImageWidth => "border-image-width",
    BorderInline => "border-inline",
    BorderInlineColor => "border-inline-color",
    BorderInlineEnd => "border-inline-end",
    BorderInlineEndColor => "border-inline-end-color",
    BorderInlineEndStyle => "border-inline-end-style",
    BorderInlineEndWidth => "border-inline-end-width",
    BorderInlineStart => "border-inline-start",
    BorderInlineStartColor => "border-inline-start-color",
    BorderInlineStartStyle => "border-inline-start-style",
    BorderInlineStartWidth => "border-inline-start-width",
    BorderInlineStyle => "border-inline-style",
    BorderInlineWidth => "border-inline-width",
    BorderLeft => "border-left",
    BorderLeftColor => "border-left-color",
    BorderLeftStyle => "border-left-style",
    BorderLeftWidth => "border-left-width",
    BorderRadius => "border-radius",
    BorderRight => "border-right",
    BorderRightColor => "border-right-color",
    BorderRightStyle => "border-right-style",
    BorderRightWidth => "border-right-width",
    BorderSpacing => "border-spacing",
    BorderStartEndRadius => "border-start-end-radius",
    BorderStartStartRadius => "border-start-start-radius",
    BorderStyle => "border-style",
    BorderTop => "border-top",
    BorderTopColor => "border-top-color",
    BorderTopLeftRadius => "border-top-left-radius",
    BorderTopRightRadius => "border-top-right-radius",
    BorderTopStyle => "border-top-style",
    BorderTopWidth => "border-top-width",
    BorderWidth => "border-width",
    Bottom => "bottom",
    BoxDecorationBreak => "box-decoration-break",
    BoxShadow => "box-shadow",
    BoxSizing => "box-sizing",
    BreakAfter => "break-after",
    BreakBefore => "break-before",
    BreakInside => "break-inside",
    CaptionSide => "caption-side",
    CaretColor => "caret-color",
    Clear => "clear",
    ClipPath => "clip-path",
    Color => "color",
    ColorScheme => "color-scheme",
    ColumnCount => "column-count",
    ColumnFill => "column-fill",
    ColumnGap => "column-gap",
    ColumnRule => "column-rule",
    ColumnRuleColor => "column-rule-color",
    ColumnRuleStyle => "column-rule-style",
    ColumnRuleWidth => "column-rule-width",
    ColumnSpan => "column-span",
    ColumnWidth => "column-width",
    Columns => "columns",
    Contain => "contain",
    Content => "content",
    ContentVisibility => "content-visibility",
    CounterIncrement => "counter-increment",
    CounterReset => "counter-reset",
    CounterSet => "counter-set",
    Cursor => "cursor",
    Direction => "direction",
    Display => "display",
    EmptyCells => "empty-cells",
    Filter => "filter",
    Flex => "flex",
    FlexBasis => "flex-basis",
    FlexDirection => "flex-direction",
    FlexFlow => "flex-flow",
    FlexGrow => "flex-grow",
    FlexShrink => "flex-shrink",
    FlexWrap => "flex-wrap",
    Float => "float",
    ForcedColorAdjust => "forced-color-adjust",
    Font => "font",
    FontFamily => "font-family",
    FontFeatureSettings => "font-feature-settings",
    FontKerning => "font-kerning",
    FontOpticalSizing => "font-optical-sizing",
    FontSize => "font-size",
    FontSizeAdjust => "font-size-adjust",
    FontStyle => "font-style",
    FontSynthesis => "font-synthesis",
    FontVariant => "font-variant",
    FontVariantCaps => "font-variant-caps",
    FontVariantEastAsian => "font-variant-east-asian",
    FontVariantLigatures => "font-variant-ligatures",
    FontVariantNumeric => "font-variant-numeric",
    FontVariationSettings => "font-variation-settings",
    FontWeight => "font-weight",
    FontWidth => "font-width",
    Gap => "gap",
    Grid => "grid",
    GridArea => "grid-area",
    GridAutoColumns => "grid-auto-columns",
    GridAutoFlow => "grid-auto-flow",
    GridAutoRows => "grid-auto-rows",
    GridColumn => "grid-column",
    GridColumnEnd => "grid-column-end",
    GridColumnStart => "grid-column-start",
    GridRow => "grid-row",
    GridRowEnd => "grid-row-end",
    GridRowStart => "grid-row-start",
    GridTemplate => "grid-template",
    GridTemplateAreas => "grid-template-areas",
    GridTemplateColumns => "grid-template-columns",
    GridTemplateRows => "grid-template-rows",
    Height => "height",
    Hyphens => "hyphens",
    ImageOrientation => "image-orientation",
    ImageRendering => "image-rendering",
    InlineSize => "inline-size",
    Inset => "inset",
    InsetBlock => "inset-block",
    InsetBlockEnd => "inset-block-end",
    InsetBlockStart => "inset-block-start",
    InsetInline => "inset-inline",
    InsetInlineEnd => "inset-inline-end",
    InsetInlineStart => "inset-inline-start",
    Isolation => "isolation",
    JustifyContent => "justify-content",
    JustifyItems => "justify-items",
    JustifySelf => "justify-self",
    Left => "left",
    LetterSpacing => "letter-spacing",
    LineBreak => "line-break",
    LineHeight => "line-height",
    ListStyle => "list-style",
    ListStyleImage => "list-style-image",
    ListStylePosition => "list-style-position",
    ListStyleType => "list-style-type",
    Margin => "margin",
    MarginBlock => "margin-block",
    MarginBlockEnd => "margin-block-end",
    MarginBlockStart => "margin-block-start",
    MarginBottom => "margin-bottom",
    MarginInline => "margin-inline",
    MarginInlineEnd => "margin-inline-end",
    MarginInlineStart => "margin-inline-start",
    MarginLeft => "margin-left",
    MarginRight => "margin-right",
    MarginTop => "margin-top",
    Mask => "mask",
    MaskImage => "mask-image",
    MaxBlockSize => "max-block-size",
    MaxHeight => "max-height",
    MaxInlineSize => "max-inline-size",
    MaxWidth => "max-width",
    MinBlockSize => "min-block-size",
    MinHeight => "min-height",
    MinInlineSize => "min-inline-size",
    MinWidth => "min-width",
    MixBlendMode => "mix-blend-mode",
    ObjectFit => "object-fit",
    ObjectPosition => "object-position",
    Offset => "offset",
    OffsetAnchor => "offset-anchor",
    OffsetDistance => "offset-distance",
    OffsetPath => "offset-path",
    OffsetRotate => "offset-rotate",
    Opacity => "opacity",
    Order => "order",
    Orphans => "orphans",
    Outline => "outline",
    OutlineColor => "outline-color",
    OutlineOffset => "outline-offset",
    OutlineStyle => "outline-style",
    OutlineWidth => "outline-width",
    Overflow => "overflow",
    OverflowAnchor => "overflow-anchor",
    OverflowWrap => "overflow-wrap",
    OverflowX => "overflow-x",
    OverflowY => "overflow-y",
    OverscrollBehavior => "overscroll-behavior",
    OverscrollBehaviorBlock => "overscroll-behavior-block",
    OverscrollBehaviorInline => "overscroll-behavior-inline",
    OverscrollBehaviorX => "overscroll-behavior-x",
    OverscrollBehaviorY => "overscroll-behavior-y",
    Padding => "padding",
    PaddingBlock => "padding-block",
    PaddingBlockEnd => "padding-block-end",
    PaddingBlockStart => "padding-block-start",
    PaddingBottom => "padding-bottom",
    PaddingInline => "padding-inline",
    PaddingInlineEnd => "padding-inline-end",
    PaddingInlineStart => "padding-inline-start",
    PaddingLeft => "padding-left",
    PaddingRight => "padding-right",
    PaddingTop => "padding-top",
    Perspective => "perspective",
    PerspectiveOrigin => "perspective-origin",
    PlaceContent => "place-content",
    PlaceItems => "place-items",
    PlaceSelf => "place-self",
    PointerEvents => "pointer-events",
    Position => "position",
    PrintColorAdjust => "print-color-adjust",
    Quotes => "quotes",
    Resize => "resize",
    Right => "right",
    Rotate => "rotate",
    RowGap => "row-gap",
    Scale => "scale",
    ScrollBehavior => "scroll-behavior",
    ScrollMargin => "scroll-margin",
    ScrollMarginBlock => "scroll-margin-block",
    ScrollMarginBlockEnd => "scroll-margin-block-end",
    ScrollMarginBlockStart => "scroll-margin-block-start",
    ScrollMarginBottom => "scroll-margin-bottom",
    ScrollMarginInline => "scroll-margin-inline",
    ScrollMarginInlineEnd => "scroll-margin-inline-end",
    ScrollMarginInlineStart => "scroll-margin-inline-start",
    ScrollMarginLeft => "scroll-margin-left",
    ScrollMarginRight => "scroll-margin-right",
    ScrollMarginTop => "scroll-margin-top",
    ScrollPadding => "scroll-padding",
    ScrollPaddingBlock => "scroll-padding-block",
    ScrollPaddingBlockEnd => "scroll-padding-block-end",
    ScrollPaddingBlockStart => "scroll-padding-block-start",
    ScrollPaddingBottom => "scroll-padding-bottom",
    ScrollPaddingInline => "scroll-padding-inline",
    ScrollPaddingInlineEnd => "scroll-padding-inline-end",
    ScrollPaddingInlineStart => "scroll-padding-inline-start",
    ScrollPaddingLeft => "scroll-padding-left",
    ScrollPaddingRight => "scroll-padding-right",
    ScrollPaddingTop => "scroll-padding-top",
    ScrollSnapAlign => "scroll-snap-align",
    ScrollSnapStop => "scroll-snap-stop",
    ScrollSnapType => "scroll-snap-type",
    ScrollbarColor => "scrollbar-color",
    ScrollbarGutter => "scrollbar-gutter",
    ScrollbarWidth => "scrollbar-width",
    ShapeImageThreshold => "shape-image-threshold",
    ShapeMargin => "shape-margin",
    ShapeOutside => "shape-outside",
    TabSize => "tab-size",
    TableLayout => "table-layout",
    TextAlign => "text-align",
    TextAlignLast => "text-align-last",
    TextCombineUpright => "text-combine-upright",
    TextDecoration => "text-decoration",
    TextDecorationColor => "text-decoration-color",
    TextDecorationLine => "text-decoration-line",
    TextDecorationSkipInk => "text-decoration-skip-ink",
    TextDecorationStyle => "text-decoration-style",
    TextDecorationThickness => "text-decoration-thickness",
    TextEmphasis => "text-emphasis",
    TextEmphasisColor => "text-emphasis-color",
    TextEmphasisPosition => "text-emphasis-position",
    TextEmphasisStyle => "text-emphasis-style",
    TextIndent => "text-indent",
    TextJustify => "text-justify",
    TextOrientation => "text-orientation",
    TextOverflow => "text-overflow",
    TextShadow => "text-shadow",
    TextTransform => "text-transform",
    TextUnderlineOffset => "text-underline-offset",
    TextUnderlinePosition => "text-underline-position",
    Top => "top",
    TouchAction => "touch-action",
    Transform => "transform",
    TransformBox => "transform-box",
    TransformOrigin => "transform-origin",
    TransformStyle => "transform-style",
    Transition => "transition",
    TransitionDelay => "transition-delay",
    TransitionDuration => "transition-duration",
    TransitionProperty => "transition-property",
    TransitionTimingFunction => "transition-timing-function",
    Translate => "translate",
    UnicodeBidi => "unicode-bidi",
    UserSelect => "user-select",
    VerticalAlign => "vertical-align",
    ViewTransitionName => "view-transition-name",
    Visibility => "visibility",
    WhiteSpace => "white-space",
    Widows => "widows",
    Width => "width",
    WillChange => "will-change",
    WordBreak => "word-break",
    WordSpacing => "word-spacing",
    WritingMode => "writing-mode",
    ZIndex => "z-index",
}