@utility definitions that provide enhanced styling capabilities with built-in depth effects, color mixing, and superellipse borders.
Background Utilities
lum-bg-*
Thelum-bg-* utility creates backgrounds with automatic border color mixing and depth effect support.
- Automatic border color mixing using
color-mix()in OKLAB color space - Opacity modifiers support (e.g.,
/80for 80% opacity) - Focus state changes border to accent color (
--color-lum-accent) - Border fades out when depth is active (
--lum-depth) - Dynamic box shadows based on depth value
The border color is automatically mixed with
--color-lum-border at --lum-border-mix percentage (default 20%).lum-grad-bg-*
Creates gradient backgrounds with the same depth and border features aslum-bg-*.
--color-lum-gradient at --lum-gradient-mix percentage (default 20%).
lum-bg
Base background utility that uses a pre-defined--bg-color variable.
lum-toggle-bg-*
Specialized background utility for toggle/interactive elements with hover and active states.:after, :hover), the background lightens by mixing 10% white:
Component Utilities
lum-btn
Complete button styling with padding, transitions, and depth effects.- Smart padding based on
--lum-btn-p-xvariable (default: 2) - Hover and active scale animation (95% on active)
- Drop shadow on hover/active
- Superellipse border radius
- Background colors:
lum-bg-lum-input-bgwith hover state
lum-input
Styling for input elements with consistent padding and transitions.- Padding based on
--lum-input-p-xvariable (default: 1.5) - Smooth transitions (300ms default, 75ms on hover/active)
- Disabled state opacity (50%)
- Superellipse border radius
lum-card
Card container with flex layout and consistent spacing.- Flex column layout with 3-unit gap
- 7-unit padding
- Pre-wrap whitespace handling
- Background:
lum-bg-lum-card-bg
Padding Utilities
lum-btn-p-*
Custom padding utility for buttons with automatic horizontal/vertical ratio.lum-input-p-*
Custom padding utility for inputs.Border Utilities
rounded-lum
Applies the Luminescent border radius with superellipse corner shape.rounded-lum-*
Adjusts border radius by subtracting spacing units (useful for nested elements).border-gradient-*
Creates gradient borders using pseudo-elements.Utility Utilities
lum-hoverable
Adds hover and active state scaling with drop shadow.- Scale to 102% on hover/active
- Drop shadow on hover/active
- Smooth easing transitions
lum-loading
Creates a spinning loader animation.Usage Best Practices
All
lum-* utilities automatically integrate with the theming system and respond to CSS variable changes.- Combine utilities - Mix Luminescent utilities with standard Tailwind classes
- Use depth effects - Set
[--lum-depth:1]for elevated appearance - Customize variables - Override CSS variables inline or in your theme
- Leverage color mixing - All color utilities use OKLCH for perceptually uniform mixing
Example