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
- Use custom component styles as a SCSS module only when necessary to improve the readability and maintainability of the components
11
+
- Use custom component styles as a CSS module only when necessary to improve the readability and maintainability of the components
12
12
- Use proper responsive design utilities
13
13
- Use proper state variants
14
14
- Keep component styles consistent
15
15
16
16
## Tokens
17
-
- All tokens from Figma are programatically generated and defined in the `web/libs/ui/src/tokens/tokens.scss` file
17
+
- All tokens from Figma are programatically generated and defined in the `web/libs/ui/src/tokens/tokens.prefix.css` file
18
18
- Tokens can be regenerated by exporting from Figma using the plugin `Figma Variable Exporter` and replacing the contents of `web/design-tokens.json` with the newly exported json file then using the `cd web/ && yarn design-tokens` command
19
19
- When regenerating tokens, ensure that the project root level `make fmt-all` command is run to ensure all the files are linted and formatted properly
20
-
- Do not use any of the tokens not defined through the Figma Variable Exporter plugin and established in the `web/libs/ui/src/tokens/tokens.scss` file
20
+
- Do not use any of the tokens not defined through the Figma Variable Exporter plugin and established in the `web/libs/ui/src/tokens/tokens.prefix.css` file
21
21
- Do not use any of the default tailwind css classes, only use the ones defined through the `web/libs/ui/src/tokens/tokens.js` file
Copy file name to clipboardExpand all lines: web/libs/ui/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,13 +40,13 @@ This will automatically generate a scaffold of the following:
40
40
41
41
1. Perform the same step to creating a component for the component in question, continuing with the theme we'll use `Button` as an example.
42
42
43
-
2. Find all current definitions within the project that would require to be replaced, take the consolidated version of the existing component and place the current SCSS and TSX within the generated file equivalents from the previous step. (NOTE: Ensure to keep the new SCSS module styles import, replacing the old one that may have been copied over)
43
+
2. Find all current definitions within the project that would require to be replaced, take the consolidated version of the existing component and place the current CSS and TSX within the generated file equivalents from the previous step. (NOTE: Ensure to keep the new CSS module styles import, replacing the old one that may have been copied over)
44
44
45
45
3. Remove any `bem.tsx` imports
46
46
47
47
4. Replace the BEM components used with standard jsx tags.
48
48
49
-
5. Add the className's from the SCSS module styles object based on the same BEM structure previously found. (NOTE: Ensure that conditionals/modifiers are handled correctly)
49
+
5. Add the className's from the CSS module styles object based on the same BEM structure previously found. (NOTE: Ensure that conditionals/modifiers are handled correctly)
50
50
51
51
6. Add the component stories to the generated `button.stories.tsx` file.
0 commit comments