Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 108 additions & 4 deletions .storybook/storybook.css
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ pre .language-tsx:not(.MuiTypography-root) {

.ds-intent-grid {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 16px;
}

Expand Down Expand Up @@ -575,6 +575,28 @@ section.ds-mode-panel section {
background: var(--ds-on-tertiary-solid);
}

.ds-bg-highlight-main {
background: var(--ds-highlight);
}
.ds-bg-highlight-dark {
background: var(--ds-highlight-emphasis);
}
.ds-bg-highlight-light {
background: var(--ds-highlight-accent);
}
.ds-bg-highlight-container {
background: var(--ds-highlight-container);
}
.ds-bg-highlight-on-container {
background: var(--ds-on-highlight-container);
}
.ds-bg-highlight-solid {
background: var(--ds-highlight-solid);
}
.ds-bg-highlight-on-solid {
background: var(--ds-on-highlight-solid);
}

.ds-bg-brand-main {
background: var(--ds-brand);
}
Expand Down Expand Up @@ -694,6 +716,36 @@ section.ds-mode-panel section {
background: var(--ds-on-info-solid);
}

/* Contrast text (onPrimary, onDanger, etc.) shown as its own swatch */

.ds-bg-on-primary {
background: var(--ds-on-primary);
}
.ds-bg-on-secondary {
background: var(--ds-on-secondary);
}
.ds-bg-on-tertiary {
background: var(--ds-on-tertiary);
}
.ds-bg-on-brand {
background: var(--ds-on-brand);
}
.ds-bg-on-danger {
background: var(--ds-on-danger);
}
.ds-bg-on-warning {
background: var(--ds-on-warning);
}
.ds-bg-on-success {
background: var(--ds-on-success);
}
.ds-bg-on-info {
background: var(--ds-on-info);
}
.ds-bg-on-highlight {
background: var(--ds-on-highlight);
}

/* Foregrounds */

.ds-fg-primary-contrast,
Expand All @@ -703,7 +755,8 @@ section.ds-mode-panel section {
.ds-fg-danger-contrast,
.ds-fg-warning-contrast,
.ds-fg-success-contrast,
.ds-fg-info-contrast {
.ds-fg-info-contrast,
.ds-fg-highlight-contrast {
color: var(--ds-on-solid);
}

Expand Down Expand Up @@ -739,6 +792,40 @@ section.ds-mode-panel section {
color: var(--ds-on-info);
}

.ds-fg-highlight-contrast {
color: var(--ds-on-highlight);
}

/* Paired with the on-X backgrounds above so contrastText swatches stay legible */

.ds-fg-primary-main {
color: var(--ds-primary);
}
.ds-fg-secondary-main {
color: var(--ds-secondary);
}
.ds-fg-tertiary-main {
color: var(--ds-tertiary);
}
.ds-fg-brand-main {
color: var(--ds-brand);
}
.ds-fg-danger-main {
color: var(--ds-danger);
}
.ds-fg-warning-main {
color: var(--ds-warning);
}
.ds-fg-success-main {
color: var(--ds-success);
}
.ds-fg-info-main {
color: var(--ds-info);
}
.ds-fg-highlight-main {
color: var(--ds-highlight);
}

.ds-fg-primary-container {
color: var(--ds-primary-container);
}
Expand Down Expand Up @@ -796,6 +883,19 @@ section.ds-mode-panel section {
color: var(--ds-on-tertiary-fixed);
}

.ds-fg-highlight-container {
color: var(--ds-highlight-container);
}
.ds-fg-highlight-on-container {
color: var(--ds-on-highlight-container);
}
.ds-fg-highlight-solid {
color: var(--ds-highlight-solid);
}
.ds-fg-highlight-on-solid {
color: var(--ds-on-highlight-solid);
}

.ds-fg-brand-container {
color: var(--ds-brand-container);
}
Expand Down Expand Up @@ -930,8 +1030,12 @@ section.ds-mode-panel section {
background: var(--ds-on-surface-muted);
}

.ds-bg-action-disabled {
background: var(--ds-action-disabled);
.ds-bg-on-surface-disabled {
background: var(--ds-on-surface-disabled);
}

.ds-bg-control-disabled {
background: var(--ds-control-disabled);
}

.ds-bg-placeholder {
Expand Down
16 changes: 8 additions & 8 deletions src/storybook/PracticalGuidance.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ They should be the default choice for layout, surfaces, borders, text, and dense
<code>--ds-surface-disabled</code>
</td>
<td>
<code>surface.disabled</code>
<code>action.disabledBackground</code>
</td>
<td>Disabled surface treatment</td>
<td>Disabled filled controls and inactive regions</td>
Expand Down Expand Up @@ -429,20 +429,20 @@ They should be the default choice for layout, surfaces, borders, text, and dense
<code>--ds-on-surface-disabled</code>
</td>
<td>
<code>text.disabled</code>
<code>text.disabled / action.disabled</code>
</td>
<td>Disabled foreground colour</td>
<td>Disabled text and icons</td>
<td>Disabled text, icons, and interactive controls (buttons, tabs, inputs)</td>
</tr>
<tr>
<td>
<code>--ds-action-disabled</code>
<code>--ds-control-disabled</code>
</td>
<td>
<code>action.disabled</code>
<code>Checkbox / Radio (Mui-disabled)</code>
</td>
<td>Disabled interactive colour</td>
<td>Disabled buttons, controls, and actions</td>
<td>Disabled control icon colour</td>
<td>Disabled checkbox and radio icons</td>
</tr>
<tr>
<td>
Expand Down Expand Up @@ -539,7 +539,7 @@ Prefer layered surfaces and borders over heavy shadows.
<code>--ds-surface-disabled</code>
</td>
<td>
<code>surface.disabled</code>
<code>action.disabledBackground</code>
</td>
<td>Disabled surface treatment</td>
<td>
Expand Down
14 changes: 7 additions & 7 deletions src/storybook/foundation/1. colour.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@ Neutral tokens create the structure of the interface. They should be the default
<code>--ds-surface-disabled</code>
</td>
<td>
<code>surface.disabled</code>
<code>action.disabledBackground</code>
</td>
<td>Disabled surface treatment</td>
<td>Disabled filled controls and inactive regions</td>
Expand Down Expand Up @@ -958,20 +958,20 @@ Neutral tokens create the structure of the interface. They should be the default
<code>--ds-on-surface-disabled</code>
</td>
<td>
<code>text.disabled</code>
<code>text.disabled / action.disabled</code>
</td>
<td>Disabled foreground colour</td>
<td>Disabled text and icons</td>
<td>Disabled text, icons, and interactive controls (buttons, tabs, inputs)</td>
</tr>
<tr>
<td>
<code>--ds-action-disabled</code>
<code>--ds-control-disabled</code>
</td>
<td>
<code>action.disabled</code>
<code>Checkbox / Radio (Mui-disabled)</code>
</td>
<td>Disabled interactive colour</td>
<td>Disabled buttons, controls, and actions</td>
<td>Disabled control icon colour</td>
<td>Disabled checkbox and radio icons</td>
</tr>
<tr>
<td>
Expand Down
Loading
Loading