mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-20 20:34:19 +00:00
Add a two-dimensional theme system: Style (Clean/Playful) × Mode (Light/Dark/System). Theme infrastructure: - ThemeContext with style + mode state, matchMedia listener, localStorage persistence - ThemePopover in sidebar for switching style and mode - FOUC prevention via inline script in index.html - CSS custom properties for radius, shadows, fonts (resolved per theme) - design.ts migrated to CSS variable refs Playful theme features: - Wobbly border-radius on cards, buttons, badges, inputs, dialogs - Hard offset shadows (no blur) for sketch aesthetic - Caveat handwritten font for headings, DM Sans for body text - Dotted paper texture background - Skill cards as pastel sticky notes with masking tape strips - Wavy underlines on links - Dashed sidebar border with Caveat section headers - Per-card wobble variety (6 unique border-radius patterns) Component enhancements: - ss-* CSS class hooks on all themed components for CSS-only overrides - SegmentedControl: aria-pressed for theme targeting, clean defaults - SkillDetailSkeleton: custom loading skeleton matching detail page layout - Dashboard Quick Action cards: hover animations (pulse/bounce) - AuditPage: fix tour step targeting Clean theme unchanged — all Playful styles scoped under [data-theme="playful"].
41 lines
1.1 KiB
TypeScript
41 lines
1.1 KiB
TypeScript
/**
|
|
* Minimal Design System Constants
|
|
*
|
|
* Simple border-radius, subtle shadows, and semantic colors
|
|
* for inline styles where Tailwind classes aren't sufficient.
|
|
*/
|
|
|
|
/** Standard border-radius values (resolve via CSS custom properties for theme override) */
|
|
export const radius = {
|
|
/** Small elements — badges, chips */
|
|
sm: 'var(--radius-sm)',
|
|
/** Medium elements — cards, containers */
|
|
md: 'var(--radius-md)',
|
|
/** Large elements — modals, panels */
|
|
lg: 'var(--radius-lg)',
|
|
/** Buttons — pill shape */
|
|
btn: 'var(--radius-btn)',
|
|
/** Full round — avatars, pills */
|
|
full: 'var(--radius-full)',
|
|
} as const;
|
|
|
|
/** Shadow presets (mirrors CSS variables for inline use) */
|
|
export const shadows = {
|
|
sm: 'var(--shadow-sm)',
|
|
md: 'var(--shadow-md)',
|
|
lg: 'var(--shadow-lg)',
|
|
hover: 'var(--shadow-hover)',
|
|
active: 'none',
|
|
accent: 'var(--shadow-accent)',
|
|
blue: 'var(--shadow-blue)',
|
|
} as const;
|
|
|
|
/** Semantic colors for inline styles (audit helpers, charts) */
|
|
export const palette = {
|
|
accent: '#dc4538',
|
|
info: '#2d5da1',
|
|
success: '#2e8b57',
|
|
warning: '#d4870e',
|
|
danger: '#c0392b',
|
|
} as const;
|