Skip to content

Commit d8001c4

Browse files
committed
Fix new semantic css names.
1 parent 79a69ca commit d8001c4

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

‎frontend/purestack.studio/guides/semantic-tones.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Keep fill, border, and text from the same role when you need a ready-made combin
123123

124124
`spotlight` is for large areas such as feature bands, callouts, and showcase panels. It is a calm field with a soft light, without the gloss and edge shading of surfaces and buttons, so it stays calm at any size. It has no interaction states and pairs with the alternate surface border and text classes. Components accept it as `variant="spotlight"`, for example `<Panel tone="accent" variant="spotlight">`.
125125

126-
Keep spotlights rare: one or two per page, for the pieces a visitor should notice first. Most surfaces should be quiet. `tone-fill-surface-flat`, `tone-fill-surface-alt-flat`, and `tone-fill-button-flat` paint a role's single color without the gradient chrome, with the same `-hover`, `-active`, `-disabled`, and `-all` forms as the gradient fills. Components accept them as `variant="flat"`, `variant="flatAlt"`, and `variant="flatSolid"`:
126+
Keep spotlights rare: one or two per page, for the pieces a visitor should notice first. Most surfaces should be quiet. `tone-fill-flat`, `tone-fill-flat-alt`, and `tone-fill-flat-solid` paint a role's single color without the gradient chrome, with the same `-hover`, `-active`, `-disabled`, and `-all` forms as the gradient fills. Components accept them as `variant="flat"`, `variant="flatAlt"`, and `variant="flatSolid"`:
127127

128128
```mdx
129129
<Panel tone="neutral" variant="flat">A quiet card</Panel>

‎packages/ts-components/src/standard/componentVariant.ts‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ const STATELESS_COMPONENT_VARIANT_CLASSES: Record<ComponentVariant, string> = {
4949
'b-1 rounded-md tone-fill-spotlight tone-border-surface-alt tone-text-surface-alt',
5050
glass:
5151
'b-1 rounded-md tone-fill-glass tone-border-surface-alt tone-text-surface-alt',
52-
flat: 'b-1 rounded-md tone-fill-surface-flat tone-border-surface tone-text-surface',
52+
flat: 'b-1 rounded-md tone-fill-flat tone-border-surface tone-text-surface',
5353
flatAlt:
54-
'b-1 rounded-md tone-fill-surface-alt-flat tone-border-surface-alt tone-text-surface-alt',
54+
'b-1 rounded-md tone-fill-flat-alt tone-border-surface-alt tone-text-surface-alt',
5555
flatSolid:
56-
'b-1 rounded-md tone-fill-button-flat tone-border-button tone-text-button',
56+
'b-1 rounded-md tone-fill-flat-solid tone-border-button tone-text-button',
5757
outlineFill: 'b-2 rounded-md tone-border-button tone-text',
5858
outline: 'b-2 rounded-md tone-text',
5959
subtle: 'b-0 rounded-md tone-text',
@@ -66,11 +66,11 @@ const STATELESS_COMPONENT_VARIANT_CLASSES: Record<ComponentVariant, string> = {
6666
}
6767

6868
const STATEFUL_COMPONENT_VARIANT_CLASSES = {
69-
flat: 'tone-fill-surface-flat-hover tone-fill-surface-flat-active tone-border-surface-hover tone-border-surface-active tone-text-surface-hover tone-text-surface-active',
69+
flat: 'tone-fill-flat-hover tone-fill-flat-active tone-border-surface-hover tone-border-surface-active tone-text-surface-hover tone-text-surface-active',
7070
flatAlt:
71-
'tone-fill-surface-alt-flat-hover tone-fill-surface-alt-flat-active tone-border-surface-alt-hover tone-border-surface-alt-active tone-text-surface-alt-hover tone-text-surface-alt-active',
71+
'tone-fill-flat-alt-hover tone-fill-flat-alt-active tone-border-surface-alt-hover tone-border-surface-alt-active tone-text-surface-alt-hover tone-text-surface-alt-active',
7272
flatSolid:
73-
'tone-fill-button-flat-hover tone-fill-button-flat-active tone-border-button-hover tone-border-button-active tone-text-button-hover tone-text-button-active',
73+
'tone-fill-flat-solid-hover tone-fill-flat-solid-active tone-border-button-hover tone-border-button-active tone-text-button-hover tone-text-button-active',
7474
solid:
7575
'tone-fill-button-hover tone-fill-button-active tone-border-button-hover tone-border-button-active tone-text-button-hover tone-text-button-active',
7676
surface:

‎packages/ts-style/src/semanticPresets.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,9 @@ function createFills(
216216
},
217217
// Flat fills paint each role's single color, without the gradient
218218
// chrome, for the many quiet surfaces around a few spotlights.
219-
'tone-fill-surface-flat': flatFill(current.surface),
220-
'tone-fill-surface-alt-flat': flatFill(current.surfaceAlt),
221-
'tone-fill-button-flat': flatFill(current.button),
219+
'tone-fill-flat': flatFill(current.surface),
220+
'tone-fill-flat-alt': flatFill(current.surfaceAlt),
221+
'tone-fill-flat-solid': flatFill(current.button),
222222
'tone-fill-surface': {
223223
all: true,
224224
rest: {

0 commit comments

Comments
 (0)