feat(ui): add accessible tooltips and enforce compact operational typography
This commit is contained in:
+42
-13
@@ -1,7 +1,7 @@
|
||||
@import "@nodedc/tokens/tokens.css";
|
||||
@import "@nodedc/tokens/themes.css";
|
||||
|
||||
:where([data-nodedc-ui], .nodedc-ui-root) {
|
||||
:where([data-nodedc-ui], .nodedc-ui-root, .nodedc-window, .nodedc-workspace-window, .nodedc-application-panel, .nodedc-admin-panel) {
|
||||
color: var(--nodedc-text-primary);
|
||||
font-family: var(--nodedc-font-family);
|
||||
font-synthesis: none;
|
||||
@@ -9,6 +9,18 @@
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
/* Theme attributes may live on html. Set the text base on body instead, so
|
||||
rem tokens and user zoom never get multiplied by the operational base. */
|
||||
:where([data-nodedc-ui]:not(html), .nodedc-ui-root:not(html), html[data-nodedc-ui] > body, html.nodedc-ui-root > body, .nodedc-window, .nodedc-workspace-window, .nodedc-application-panel, .nodedc-admin-panel) {
|
||||
font-size: var(--nodedc-font-size-md);
|
||||
}
|
||||
|
||||
/* Semantic headings inside operational surfaces do not inherit browser h1–h6 scaling.
|
||||
Explicit canonical window/page titles retain their title token. */
|
||||
:where([data-nodedc-ui], .nodedc-ui-root, .nodedc-window, .nodedc-workspace-window, .nodedc-application-panel, .nodedc-admin-panel) :where(h1, h2, h3, h4, h5, h6) {
|
||||
font-size: var(--nodedc-font-size-md);
|
||||
}
|
||||
|
||||
:where([data-nodedc-ui], .nodedc-ui-root) *,
|
||||
:where([data-nodedc-ui], .nodedc-ui-root) *::before,
|
||||
:where([data-nodedc-ui], .nodedc-ui-root) *::after {
|
||||
@@ -1431,7 +1443,7 @@ textarea.nodedc-field__control {
|
||||
|
||||
.nodedc-user-profile-card__cover strong {
|
||||
margin-top: 0.25rem;
|
||||
font-size: 0.92rem;
|
||||
font-size: var(--nodedc-font-size-md);
|
||||
}
|
||||
|
||||
.nodedc-user-profile-card__cover > span:not(.nodedc-header__avatar) {
|
||||
@@ -1458,7 +1470,7 @@ textarea.nodedc-field__control {
|
||||
text-align: left;
|
||||
text-decoration: none;
|
||||
font: inherit;
|
||||
font-size: 0.82rem;
|
||||
font-size: var(--nodedc-font-size-md);
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -1703,7 +1715,7 @@ textarea.nodedc-field__control {
|
||||
}
|
||||
|
||||
.nodedc-application-panel__titles h1 {
|
||||
font-size: 1.15rem;
|
||||
font-size: var(--nodedc-font-size-title);
|
||||
font-weight: 780;
|
||||
line-height: 1.15;
|
||||
}
|
||||
@@ -1711,7 +1723,7 @@ textarea.nodedc-field__control {
|
||||
.nodedc-application-panel__titles p {
|
||||
max-width: 42rem;
|
||||
color: var(--nodedc-text-muted);
|
||||
font-size: 0.75rem;
|
||||
font-size: var(--nodedc-font-size-sm);
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
@@ -1847,7 +1859,7 @@ textarea.nodedc-field__control {
|
||||
|
||||
.nodedc-admin-panel__head p {
|
||||
color: var(--nodedc-text-muted);
|
||||
font-size: 0.68rem;
|
||||
font-size: var(--nodedc-font-size-sm);
|
||||
font-weight: 850;
|
||||
letter-spacing: 0.04em;
|
||||
text-transform: uppercase;
|
||||
@@ -1855,7 +1867,7 @@ textarea.nodedc-field__control {
|
||||
|
||||
.nodedc-admin-panel__head h2 {
|
||||
margin-top: 0.55rem;
|
||||
font-size: 1.15rem;
|
||||
font-size: var(--nodedc-font-size-title);
|
||||
font-weight: 780;
|
||||
line-height: 1.1;
|
||||
}
|
||||
@@ -2008,7 +2020,7 @@ textarea.nodedc-field__control {
|
||||
}
|
||||
|
||||
.nodedc-admin-context__body strong {
|
||||
font-size: 0.92rem;
|
||||
font-size: var(--nodedc-font-size-md);
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
@@ -2047,7 +2059,7 @@ textarea.nodedc-field__control {
|
||||
color: var(--nodedc-text-secondary);
|
||||
padding: 5px 0.9rem 5px calc(5px + 2.92rem + 0.86rem);
|
||||
font: inherit;
|
||||
font-size: 0.91rem;
|
||||
font-size: var(--nodedc-font-size-md);
|
||||
font-weight: 570;
|
||||
text-align: left;
|
||||
opacity: 0.66;
|
||||
@@ -4099,7 +4111,7 @@ textarea.nodedc-field__control {
|
||||
max-width: 34rem;
|
||||
margin: 0;
|
||||
color: var(--nodedc-text-secondary);
|
||||
font-size: clamp(0.8rem, 1vw, 1rem);
|
||||
font-size: var(--nodedc-font-size-sm);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
@@ -4134,7 +4146,7 @@ textarea.nodedc-field__control {
|
||||
.nodedc-landing-stage__status p {
|
||||
margin: 0.15rem 0 0;
|
||||
color: var(--nodedc-text-muted);
|
||||
font-size: 0.66rem;
|
||||
font-size: var(--nodedc-font-size-sm);
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
@@ -4241,7 +4253,7 @@ textarea.nodedc-field__control {
|
||||
.nodedc-environment-media-playlist__error {
|
||||
margin: 0;
|
||||
color: var(--nodedc-text-muted);
|
||||
font-size: var(--nodedc-font-size-xs);
|
||||
font-size: var(--nodedc-font-size-sm);
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
@@ -4353,7 +4365,7 @@ textarea.nodedc-field__control {
|
||||
}
|
||||
@media (max-height: 720px) and (min-width: 761px) {
|
||||
.nodedc-landing-stage__copy p {
|
||||
font-size: 0.76rem;
|
||||
font-size: var(--nodedc-font-size-sm);
|
||||
}
|
||||
}
|
||||
@media (max-height: 720px) and (min-width: 761px) {
|
||||
@@ -4676,3 +4688,20 @@ textarea.nodedc-field__control {
|
||||
|
||||
.nodedc-level-button[data-custom-fill].nodedc-button{position:relative;overflow:hidden;background-image:none}
|
||||
.nodedc-level-button__fill{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none;background:var(--nodedc-level-custom);color:var(--nodedc-level-ink);clip-path:inset(0 calc(100% - var(--nodedc-level-percent)) 0 0)}
|
||||
|
||||
|
||||
.nodedc-tooltip-anchor { display: inline-flex; min-width: 0; }
|
||||
.nodedc-tooltip-anchor[tabindex] { border-radius: var(--nodedc-radius-control-compact); }
|
||||
.nodedc-tooltip-anchor[tabindex]:focus-visible { outline: 2px solid var(--nodedc-text-primary); outline-offset: 3px; }
|
||||
.nodedc-tooltip {
|
||||
position: fixed; z-index: var(--nodedc-layer-popover); box-sizing: border-box;
|
||||
width: max-content; max-width: min(280px, calc(100vw - 16px)); overflow: auto;
|
||||
padding: var(--nodedc-space-3) var(--nodedc-space-4);
|
||||
border-radius: var(--nodedc-radius-control-compact);
|
||||
background: var(--nodedc-floating-surface); color: var(--nodedc-text-primary);
|
||||
box-shadow: var(--nodedc-glass-dropdown-shadow); font-family: var(--nodedc-font-family);
|
||||
font-size: var(--nodedc-font-size-sm); font-weight: var(--nodedc-font-weight-regular); line-height: 1.4;
|
||||
animation: nodedc-tooltip-in var(--nodedc-duration-fast) var(--nodedc-ease-standard);
|
||||
}
|
||||
@keyframes nodedc-tooltip-in { from { opacity: 0; } to { opacity: 1; } }
|
||||
@media (prefers-reduced-motion: reduce) { .nodedc-tooltip { animation: none; } }
|
||||
|
||||
Reference in New Issue
Block a user