css_class_generators.ts view source
ClassTemplateFn<T1, T2, T3> generics
T1
stringT2
stringT3
string19 declarations
css_class_generators.ts view source
ClassTemplateFn<T1, T2, T3> T1stringT2stringT3stringcss_class_generators.ts view source
ClassTemplateResult css_class_generators.ts view source
readonly ["1", "2", "3", "4", "5", "6", "7", "8", "9"] css_class_generators.ts view source
"1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" css_class_generators.ts view source
readonly ["top", "right", "bottom", "left"] css_class_generators.ts view source
readonly ["inherit", "initial", "revert", "revert_layer", "unset"] css_class_generators.ts view source
"top" | "right" | "bottom" | "left" css_class_generators.ts view source
"inherit" | "initial" | "revert" | "revert_layer" | "unset" css_class_generators.ts view source
(value: string): string Format width/height values for CSS (handles 0, auto, percentages, pixels, content values, and CSS variables). Used by width and height properties.
valuestringstring css_class_generators.ts view source
(value: string): string Format spacing values for CSS (handles 0, auto, percentages, pixels, and CSS variables). Used by margin, padding, gap, inset, top/right/bottom/left, etc.
valuestringstring css_class_generators.ts view source
(values: Iterable<string>, formatter?: ((value: string) => string) | undefined): Record<string, CssClassDeclaration> Generate border radius corner classes for all four corners. Creates classes for top-left, top-right, bottom-left, bottom-right corners.
values- The values to generate classes for
Iterable<string>formatter?- Optional function to format values
((value: string) => string) | undefinedRecord<string, CssClassDeclaration> css_class_generators.ts view source
<T1 = string, T2 = string, T3 = string>(template: ClassTemplateFn<T1, T2, T3>, values: Iterable<T1>, secondary?: Iterable<T2> | undefined, tertiary?: Iterable<...> | undefined): Record<...> Generates CSS class declarations from templates. Supports up to 3 dimensions of multiplicative combinations.
template- Function that generates CSS from values, can return null to skip
ClassTemplateFn<T1, T2, T3>values- Primary iterable of values
Iterable<T1>secondary?- Optional second dimension (makes it multiplicative)
Iterable<T2> | undefinedtertiary?- Optional third dimension for even more combinations
Iterable<T3> | undefinedRecord<string, CssClassDeclaration> css_class_generators.ts view source
(property: string, values: Iterable<string>, formatter?: ((v: string) => string) | undefined): Record<string, CssClassDeclaration> Generate directional classes for properties like margin and padding. Creates classes for all directions: base, top, right, bottom, left, x (horizontal), y (vertical).
property- The base CSS property name (e.g. 'margin', 'padding')
stringvalues- The values to generate classes for
Iterable<string>formatter?- Optional function to format values (defaults to identity)
((v: string) => string) | undefinedRecord<string, CssClassDeclaration> css_class_generators.ts view source
(property: string): Record<string, CssClassDeclaration> propertystringRecord<string, CssClassDeclaration> css_class_generators.ts view source
(property: string, values: Iterable<string>, formatter?: ((value: string) => string) | undefined, prefix?: string): Record<string, CssClassDeclaration> Generate classes for a single CSS property with various values. This is the most common pattern, used by display, visibility, float, etc.
property- The CSS property name (e.g. 'display', 'gap')
stringvalues- The values to generate classes for
Iterable<string>formatter?- Optional function to format values (e.g. v => var(--space_${v}))
((value: string) => string) | undefinedprefix- Optional class name prefix (defaults to property with dashes replaced by underscores)
stringto_variable_name(property)Record<string, CssClassDeclaration> css_class_generators.ts view source
(property: string, values: Iterable<string>): Record<string, CssClassDeclaration> Generate classes for properties with axis variants (e.g. overflow, overflow-x, overflow-y).
property- The base CSS property name (e.g. 'overflow')
stringvalues- The values to generate classes for
Iterable<string>Record<string, CssClassDeclaration> css_class_generators.ts view source
(sizes: Iterable<string>, alpha_mapping: Record<string, string>): Record<string, CssClassDeclaration> Generate shadow classes for various shadow types and sizes. Creates classes for regular, top, bottom, inset, inset-top, and inset-bottom shadows. Each shadow uses color-mix with alpha values for transparency.
sizes- The shadow size variants (xs, sm, md, lg, xl)
Iterable<string>alpha_mapping- Mapping of sizes to alpha numbers (1-5)
Record<string, string>Record<string, CssClassDeclaration> css_class_generators.ts view source
(str: string): string strstringstring css_class_generators.ts view source
(str: string): string strstringstring