fix(sw): preserve theme token inheritance across viewer components
This commit is contained in:
1 parent
40c5b89814
commit
41e963a12a
17 files changed
+445
-21
No files matched your search
@@ -1,10 +1,10 @@
|
||||
/* @hm-design/sw — SW Footer (Figma "레이아웃 분리" 26:10097 bottom bar, components 26:9459 … 26:10097, read
|
||||
through the Figma Plugin API 2026-10-20). Footer-only tokens. Text keeps the SW typography of sw.css
|
||||
(Noto Sans KR instead of Dotum, black OUTSIDE outline as 16 text-shadows, own-color 0.3 / 0.4px strokes removed
|
||||
like the 2026-10-16 header fix). Never touches global selectors, SWHeader or SWPopup classes. */
|
||||
like the 2026-10-16 header fix). Never touches global selectors, SWHeader or SWPopup classes.
|
||||
Declared on the outermost SW scope only, like sw.css: the command line inside the bar inherits the tokens. */
|
||||
|
||||
.hm-sw-header,
|
||||
.hm-sw-theme {
|
||||
:is(.hm-sw-header, .hm-sw-theme):not(:where(.hm-sw-header, .hm-sw-theme) *) {
|
||||
/* Bar (26:10098 background, 72px high, #060606) */
|
||||
--hm-sw-footer-height: 72px;
|
||||
--hm-sw-footer-background: #060606;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/* @hm-design/sw — SW viewer mode (reference: DWG/DXF viewer top menu and floating panels, measured 2026-10-19).
|
||||
Viewer-only tokens. The three header surfaces reuse the user-confirmed SW tokens of sw.css
|
||||
(--hm-sw-header-document-* / object-* / property-*). Never touches global selectors or the SWHeader. */
|
||||
(--hm-sw-header-document-* / object-* / property-*). Never touches global selectors or the SWHeader.
|
||||
Declared on the outermost SW scope only, like sw.css: nested viewer menus / panels inherit the tokens. */
|
||||
|
||||
.hm-sw-header,
|
||||
.hm-sw-theme {
|
||||
:is(.hm-sw-header, .hm-sw-theme):not(:where(.hm-sw-header, .hm-sw-theme) *) {
|
||||
/* Header */
|
||||
--hm-sw-viewer-height: 52px;
|
||||
--hm-sw-viewer-background: linear-gradient(180deg, #266651 0%, #123328 45%, #0a221d 100%);
|
||||
|
||||
@@ -2,9 +2,13 @@
|
||||
SW-only tokens. They never touch @hm-design/ui tokens or global selectors. */
|
||||
|
||||
/* Tokens, typography and the control reset are shared by the full header and <SWTheme>,
|
||||
which scopes standalone sub-components without a consumer class. */
|
||||
.hm-sw-header,
|
||||
.hm-sw-theme {
|
||||
which scopes standalone sub-components without a consumer class.
|
||||
Token defaults are declared only on the OUTERMOST SW scope (2026-10-20): a nested scope root (viewer menu,
|
||||
More menu, panel, footer command line inside a header / footer / <SWTheme>) inherits the tokens instead of
|
||||
resetting them, so a token set through `style` (or the consumer's own class) on the outermost scope reaches
|
||||
every SW element inside it. Same specificity as before (0,1,0); the same rule is used in sw-viewer.css and
|
||||
sw-footer.css. */
|
||||
:is(.hm-sw-header, .hm-sw-theme):not(:where(.hm-sw-header, .hm-sw-theme) *) {
|
||||
/* Size */
|
||||
--hm-sw-header-height: 49px;
|
||||
--hm-sw-header-bar-height: 48px;
|
||||
@@ -171,7 +175,11 @@
|
||||
--hm-sw-header-input-hover-border-color: rgba(212, 203, 189, 0.25);
|
||||
--hm-sw-header-input-editing-background: #0f0d0a;
|
||||
--hm-sw-header-input-editing-border-color: rgba(212, 203, 189, 0.3);
|
||||
}
|
||||
|
||||
/* Every SW scope root (nested ones too) applies the typography from the inherited tokens. */
|
||||
.hm-sw-header,
|
||||
.hm-sw-theme {
|
||||
color: var(--hm-sw-header-text-color);
|
||||
font-family: var(--hm-sw-header-font-family);
|
||||
font-size: var(--hm-sw-header-font-size);
|
||||
|
||||
Reference in new issue
Block a user