You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 025a87d
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: frontend/purestack.studio/guides/semantic-tones.mdx
+24Lines changed: 24 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -177,6 +177,30 @@ Tone selection applies to descendants through current-palette CSS variables. A n
177
177
178
178
The inner `text-eyebrow` also reads the current palette, so its subtle text color changes with `tone--success`. This is why tone classes are useful for composing a small visual system instead of setting each color separately.
179
179
180
+
## Keep a region in one theme mode
181
+
182
+
Tones follow the page theme, so a neutral card is light in the light theme and dark in the dark theme. Add `theme--dark` or `theme--light` to keep a region in one mode while the page switches. The region gets that mode's full palette from the same skin and presets, and tone classes inside it work as usual. Here a dark product frame holds a light card in both themes:
<spanclass="text-subtle fs-sm">Light card, dark frame, in either theme.</span>
198
+
</div>
199
+
</div>
200
+
```
201
+
202
+
A `theme--*` region starts from the neutral tone of its mode and resets the inherited text color. Put `tone--*` on the same element or on a descendant. Rules that must win inside a region should rely on specificity, not on an outer `@scope`, because the region becomes the nearest theme scope.
203
+
180
204
## Hover, active, and disabled states
181
205
182
206
Surface and button paint roles have state variants. Hover or press the first control; compare it with the disabled control. The `-all` suffix includes the rest, hover, active, and disabled treatments for that role.
0 commit comments