Skip to content

Commit 54468c0

Browse files
committed
simplified architecture of CSS compilation for HDS components (as agreed)
1 parent fe59542 commit 54468c0

File tree

5 files changed

+5
-75
lines changed

5 files changed

+5
-75
lines changed

packages/components/rollup.config.mjs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -91,20 +91,8 @@ const plugins = [
9191
outputFile: 'design-system-components.css',
9292
},
9393
{
94-
inputFile: 'design-system-components-theming-with-css-selectors.scss',
95-
outputFile: 'design-system-components-theming-with-css-selectors.css',
96-
},
97-
{
98-
inputFile:
99-
'design-system-components-theming-with-prefers-color-scheme.scss',
100-
outputFile:
101-
'design-system-components-theming-with-prefers-color-scheme.css',
102-
},
103-
{
104-
inputFile:
105-
'design-system-components-theming-with-combined-strategies.scss',
106-
outputFile:
107-
'design-system-components-theming-with-combined-strategies.css',
94+
inputFile: 'design-system-components-common.scss',
95+
outputFile: 'design-system-components-common.css',
10896
},
10997
{
11098
inputFile: 'design-system-power-select-overrides.scss',
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
*/
55

66
// these files come from `packages/tokens/dist/`
7-
@use "products/css/themed-tokens/with-css-selectors/tokens.css";
8-
// TODO understand if these are common/shared or we should have different ones for the themed tokens
97
@use "products/css/helpers/color";
108
@use "products/css/helpers/elevation";
119
@use "products/css/helpers/focus-ring";

packages/components/src/styles/@hashicorp/design-system-components-theming-with-combined-strategies.scss

Lines changed: 0 additions & 22 deletions
This file was deleted.

packages/components/src/styles/@hashicorp/design-system-components-theming-with-prefers-color-scheme.scss

Lines changed: 0 additions & 22 deletions
This file was deleted.

packages/components/src/styles/@hashicorp/design-system-components.scss

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,8 @@
33
* SPDX-License-Identifier: MPL-2.0
44
*/
55

6-
// these files come from `packages/tokens/dist/`
6+
// these are the "standard" HDS tokens (the file comes from `packages/tokens/dist/`)
77
@use "products/css/tokens";
8-
// TODO understand if these are common/shared or we should have different ones for the themed tokens
9-
@use "products/css/helpers/color";
10-
@use "products/css/helpers/elevation";
11-
@use "products/css/helpers/focus-ring";
12-
@use "products/css/helpers/typography";
138

14-
// main components file
15-
@use "../components/index";
16-
17-
// screen-reader utility class
18-
@use "../mixins/screen-reader-only" as *;
19-
20-
.sr-only {
21-
@include screen-reader-only();
22-
}
9+
// these are the styles specific (and only) for the the HDS components
10+
@use "./design-system-components-common";

0 commit comments

Comments
 (0)