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
Copy file name to clipboardExpand all lines: projects/documentation/content/guides/styling-components.md
-11Lines changed: 0 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,8 +13,6 @@ This document outlines the details of the CSS styling for Spectrum Web Component
13
13
14
14
For each component in the project, there are up to 3 CSS files:
15
15
16
-
-`spectrum-[component-name].css` - This is the main CSS file for the component that is generated by the last build from the Spectrum CSS project before we removed that package as a dependency.
17
-
-`[component-name]-overrides.css` - This is the CSS file for the component that contains the system overrides which take different values in different themes. It was also generated by the last build from the Spectrum CSS project before we removed that package as a dependency.
18
16
-`[component-name].css` - This is the main CSS file which imports the `spectrum-[component-name].css` and `[component-name]-overrides.css` files and additionally contains the component's custom styles which were not part of the Spectrum CSS project.
19
17
20
18
### How to update the component styling
@@ -37,20 +35,11 @@ Example:
37
35
38
36
This will just work! As long as the `--spectrum-component-height-300` variable exists in the tokens package.
39
37
40
-
- If it's an update to how a component looks in one particular theme, it belongs in `[component-name]-overrides.css`.
41
-
42
-
The process to update the overrides file involves a few extra steps:
43
-
44
-
1. Update the `[component-name]-overrides.css` file to contain the new styles.
45
-
2. Make sure the new `--system-` variable exists in the tokens package. This variable can be found in the `tools/styles/tokens/[express | spectrum]/system-theme-bridge.css` file or the `tools/styles/tokens-v2/system-theme-bridge.css` file depending on the theme.
46
-
3. If the variable doesn't exist, we will need to add it to the correct file.
47
-
48
38
## Global styling
49
39
50
40
SWC project uses styles package to manage the global css tokens for all three themes. The styles package can be found in `tools/styles`. There is one very small caveat in the way we manage the styles package. We have two different tokens packages, one for the express + spectrum theme and one for the spectrum 2 theme.
51
41
52
42
-`styles/tokens` - This is the tokens package for the Express + Spectrum theme.
53
-
-`styles/tokens-v2` - This is the tokens package for the Spectrum 2 theme.
54
43
55
44
NOTE: In all likelihood, you would only need to do minor changes to the styles package. However, if you feel like you need to make major changes to the styles package, the correct approach would be to start a discussion among the team and figure out a plan together.
0 commit comments