Skip to content

Commit b30907e

Browse files
author
Jeremiah Clothier
authored
chore: add plugin for intellisense of css variables (#1748)
1 parent 4c8091d commit b30907e

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ npm-debug.log*
3232
yarn-debug.log*
3333
yarn-error.log*
3434

35-
/.vscode
3635
*.css.map
3736
!DesignTokens.css
3837
!Utilities.css

.vscode/extensions.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["dbaeumer.vscode-eslint", "phoenisx.cssvar"]
3+
}

.vscode/settings.json

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"typescriptreact"
77
],
88
"css.validate": false,
9+
"cssvar.files": ["src/tokens-dist/css/variables.css"],
910
"scss.validate": false,
1011
"stylelint.enable": true,
1112
"typescript.validate.enable": true,

docs/CONTRIBUTING.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
npx husky install
99
```
1010

11+
- Install the [CSS Var Complete - VS Code Plugin](https://marketplace.visualstudio.com/items?itemName=phoenisx.cssvar) which provides better Intellisense while writing CSS and referencing CSS variables.
12+
1113
## Git Flow
1214

1315
This project uses [Git-flow](https://nvie.com/posts/a-successful-git-branching-model/) to manage the development workflow. Here's a breakdown of what this means for the design system:
@@ -42,15 +44,14 @@ A few notes about breaking changes:
4244
- Consider writing a codemod (using [JSCodeShift](https://github.com/facebook/jscodeshift) for systematic changes.
4345
- There may be a way to make the change in a backwards-compatible way. Consider this during implementation, providing some rationale in cases where it is not feasible/practical to do so.
4446

45-
4647
## Making Edits to Tokens
4748

4849
### Adding new tokens
4950

5051
When we need to introduce new tokens to account for customizations or features in new or existing components, for each new token, we use the following process:
5152

5253
1. Determine the tier of the new token with design
53-
2. Work with design to make sure the token is added to figma with the proper naming format
54+
2. Work with design to make sure the token is added to figma with the proper naming format
5455

5556
For example, tokens in figma have a name in the format 'Category/token-name', so we'd want the resulting token in code to resolve to `--eds-theme-color-category-token-name`.
5657

@@ -71,10 +72,10 @@ For example, if we had a token `--eds-theme-color-background-old-name` which we
7172
"comment": "@deprecated This token is deprecated. Please use eds-theme-color-new-name instead."
7273
```
7374

74-
This has the folling benefits:
75+
This has the following benefits:
7576

7677
- Users who have added a theme value to `--eds-theme-color-background-old-name` will not have their theme value break upon update.
7778
- Users can see which tokens are deprecated via the autogenerated comment in the token files.
7879
- Users can adopt the new token when convenient, and EDS can publish new versions without introducing multiple breaking changes.
7980

80-
4. Finally, we replace all uses of the old token with the new token.
81+
4. Finally, we replace all uses of the old token with the new token.

0 commit comments

Comments
 (0)