:root selector and can be overridden globally or per component.
Color System
Base Colors
Base Colors
Semantic Colors
Semantic Colors
Status Colors
Status Colors
UI Colors
UI Colors
Spacing Scale
Spacing Variables
Spacing Variables
Oat UI uses a consistent spacing scale based on These are used for padding, margins, and gaps throughout components.
rem units:Usage Examples
Border Radius
Radius Variables
Radius Variables
Typography
Font Families
Font Families
Font Sizes
Font Sizes
Fluid typography scales responsively using
clamp():Heading Sizes
--text-1:<h1>headings--text-2:<h2>headings--text-3:<h3>headings--text-4:<h4>headings--text-5:<h5>headings--text-6:<h6>headings and body text--text-7: Small text, captions--text-8: Extra small text, labels
Font Weights
Font Weights
--font-bold uses 600 weight for better readability across different fonts.Line Height
Line Height
Shadows
Shadow Variables
Shadow Variables
Usage Guidelines
- Small: Subtle elevation for buttons, inputs
- Medium: Cards, dropdowns, moderate elevation
- Large: Modals, popovers, high elevation
Transitions
Transition Variables
Transition Variables
- Fast: Quick interactions like hovers, focus states
- Normal: Default transitions for most state changes
Z-Index Scale
Z-Index Variables
Z-Index Variables
Layering Hierarchy
- Base content:
0(default) - Dropdowns, tooltips:
50(--z-dropdown) - Modals, dialogs:
200(--z-modal)
Component-Specific
Component Variables
Component Variables
Using CSS Variables
In CSS
In HTML (Inline Styles)
With JavaScript
Overriding Variables
Create a custom stylesheet after Oat’s CSS:Light-Dark Function
Many color variables use thelight-dark() CSS function:
- First value (light mode):
#574747 - Second value (dark mode):
#fafafa
prefers-color-scheme setting.