extract shared theme CSS into standalone bundle
Move the 3 theme layer imports (primitives, layer2-attributes, semantic) out of admin.css and shop.css into a new theme.css bundle loaded by all root layouts. Eliminates 28 KB of duplication on admin pages where both admin.css and shop.css were each embedding the same theme CSS. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3,11 +3,6 @@
|
||||
/* Reset */
|
||||
@import "./admin/reset.css";
|
||||
|
||||
/* Theme CSS layers (used by theme editor preview) */
|
||||
@import "./theme-primitives.css";
|
||||
@import "./theme-layer2-attributes.css";
|
||||
@import "./theme-semantic.css";
|
||||
|
||||
/* Admin components, layout, icons, transitions */
|
||||
@import "./admin/components.css";
|
||||
@import "./admin/layout.css";
|
||||
|
||||
@@ -5,13 +5,6 @@
|
||||
|
||||
@import "./shop/reset.css";
|
||||
|
||||
/* Theme CSS — unlayered so it overrides component layers (intentional).
|
||||
Primitives set CSS custom properties, layer2 sets theme-aware rules,
|
||||
semantic sets base styles on .themed containers. */
|
||||
@import "./theme-primitives.css";
|
||||
@import "./theme-layer2-attributes.css";
|
||||
@import "./theme-semantic.css";
|
||||
|
||||
@import "./shop/components.css";
|
||||
@import "./shop/layout.css";
|
||||
@import "./shop/utilities.css";
|
||||
|
||||
6
assets/css/theme.css
Normal file
6
assets/css/theme.css
Normal file
@@ -0,0 +1,6 @@
|
||||
/* Theme design tokens — shared by admin and shop CSS bundles.
|
||||
Loaded separately so the browser caches it once for all page types. */
|
||||
|
||||
@import "./theme-primitives.css";
|
||||
@import "./theme-layer2-attributes.css";
|
||||
@import "./theme-semantic.css";
|
||||
Reference in New Issue
Block a user