Skip to content

Commit db5e15a

Browse files
Melissa Thompsoncastastrophe
authored andcommitted
fix(storybook): body classes for story and docs pages (#2617)
1 parent dbbb713 commit db5e15a

File tree

4 files changed

+3
-19
lines changed

4 files changed

+3
-19
lines changed

.storybook/blocks/ColorPalette.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ export const Swatch = styled.div`
4747
${props => props.background && `background: ${props.background};`}
4848
}
4949
50-
.spectrum--dark &::before,
51-
.spectrum--darkest &::before {
50+
.spectrum--dark &::before {
5251
border-color: rgba(255, 255, 255, 51%);
5352
}
5453
`;

.storybook/decorators/context.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,6 @@ export const withContextWrapper = makeDecorator({
9191
// Express only gets the express class
9292
container.classList.toggle("spectrum--express", isExpress && !isRaw);
9393

94-
// Darkest is deprecated in Spectrum 2
95-
if (isModern && color === "darkest") {
96-
/* eslint-disable no-console -- notify that darkest was deprecated in S2 */
97-
console.warn("The 'darkest' color is deprecated in Spectrum 2. Please use 'dark' instead.");
98-
color = "dark";
99-
}
100-
10194
// Let the static color override the color if it's set
10295
if (hasStaticElement && staticColorSettings[staticKey]?.color) {
10396
color = staticColorSettings[staticKey].color;
@@ -109,7 +102,7 @@ export const withContextWrapper = makeDecorator({
109102
color = "light";
110103
}
111104

112-
for (let c of ["light", "dark", "darkest"]) {
105+
for (let c of ["light", "dark"]) {
113106
container.classList.toggle(`spectrum--${c}`, c === color && !isRaw);
114107
}
115108

.storybook/types/global.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ export default {
3030
items: [
3131
{ value: "light", title: "Light", right: "default" },
3232
{ value: "dark", title: "Dark" },
33-
{ value: "darkest", title: "Darkest", right: "deprecated" },
3433
],
3534
dynamicTitle: true,
3635
},

tokens/project.json

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,8 @@
6262
"{projectRoot}/dist/css/global-vars.css",
6363
"{projectRoot}/dist/css/light-vars.css",
6464
"{projectRoot}/dist/css/dark-vars.css",
65-
"{projectRoot}/dist/css/darkest-vars.css",
6665
"{projectRoot}/dist/css/medium-vars.css",
67-
"{projectRoot}/dist/css/large-vars.css",
68-
"{projectRoot}/dist/css/spectrum/global-vars.css",
69-
"{projectRoot}/dist/css/spectrum/medium-vars.css",
70-
"{projectRoot}/dist/css/spectrum/large-vars.css",
71-
"{projectRoot}/dist/css/express/global-vars.css",
72-
"{projectRoot}/dist/css/express/medium-vars.css",
73-
"{projectRoot}/dist/css/express/large-vars.css"
66+
"{projectRoot}/dist/css/large-vars.css"
7467
]
7568
}
7669
}

0 commit comments

Comments
 (0)