The accent color HSL components (--t-accent-h, --t-accent-s, --t-accent-l) were hardcoded in :root, which prevented the dynamically generated values from the CSS generator from taking effect properly. Now the HSL components are only set by the CSS generator in .preview-frame, and theme-semantic.css only defines the derived colors that use those variables. Also wrapped accent color inputs in a form element as required by Phoenix LiveView for phx-change events. Verified that changing presets properly updates button colors (e.g., studio preset → blue buttons). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
71 lines
2.4 KiB
CSS
71 lines
2.4 KiB
CSS
/* ========================================
|
|
THEME SEMANTIC - Layer 3
|
|
Semantic aliases for easy usage
|
|
======================================== */
|
|
|
|
:root {
|
|
/* Accent color - HSL components set dynamically by CSS generator */
|
|
/* Derived accent colors use the dynamic HSL values */
|
|
--t-accent: hsl(var(--t-accent-h) var(--t-accent-s) var(--t-accent-l));
|
|
--t-accent-hover: hsl(var(--t-accent-h) var(--t-accent-s) calc(var(--t-accent-l) - 8%));
|
|
--t-accent-subtle: hsl(var(--t-accent-h) 40% 95%);
|
|
--t-accent-ring: hsl(var(--t-accent-h) var(--t-accent-s) var(--t-accent-l) / 0.4);
|
|
|
|
/* Secondary colors */
|
|
--t-secondary-accent: #ea580c;
|
|
--t-sale-color: #dc2626;
|
|
|
|
/* Density multiplier */
|
|
--t-density: 1;
|
|
|
|
/* Layout */
|
|
--t-layout-max-width: 1400px;
|
|
--t-button-style: filled;
|
|
--t-card-shadow: none;
|
|
--t-product-text-align: left;
|
|
|
|
/* Page colors */
|
|
--color-page: var(--t-surface-base);
|
|
--color-card: var(--t-surface-raised);
|
|
--color-input: var(--t-surface-raised);
|
|
|
|
/* Text colors */
|
|
--color-heading: var(--t-text-primary);
|
|
--color-body: var(--t-text-secondary);
|
|
--color-caption: var(--t-text-tertiary);
|
|
|
|
/* Button colors */
|
|
--color-button-primary: var(--t-accent);
|
|
--color-button-primary-hover: var(--t-secondary-accent);
|
|
--color-button-primary-text: var(--t-text-inverse);
|
|
|
|
/* Border colors */
|
|
--color-border: var(--t-border-default);
|
|
|
|
/* Typography */
|
|
--font-heading: var(--t-font-heading);
|
|
--font-body: var(--t-font-body);
|
|
--weight-heading: var(--t-heading-weight);
|
|
--tracking-heading: var(--t-heading-tracking);
|
|
|
|
/* Border radius */
|
|
--radius-button: var(--t-radius-button);
|
|
--radius-card: var(--t-radius-card);
|
|
--radius-input: var(--t-radius-input);
|
|
--radius-image: var(--t-radius-image);
|
|
|
|
/* Shadows */
|
|
--shadow-sm:
|
|
0 1px 2px hsl(var(--p-shadow-color) / calc(var(--p-shadow-strength) * 0.5)),
|
|
0 1px 3px hsl(var(--p-shadow-color) / var(--p-shadow-strength));
|
|
--shadow-md:
|
|
0 2px 4px hsl(var(--p-shadow-color) / calc(--p-shadow-strength) * 0.5)),
|
|
0 4px 8px hsl(var(--p-shadow-color) / var(--p-shadow-strength)),
|
|
0 8px 16px hsl(var(--p-shadow-color) / calc(var(--p-shadow-strength) * 0.5));
|
|
|
|
/* Transitions */
|
|
--transition-fast: var(--p-duration-fast) var(--p-ease-out);
|
|
--transition-normal: var(--p-duration-normal) var(--p-ease-out);
|
|
--transition-bounce: var(--p-duration-normal) var(--p-ease-out-back);
|
|
}
|