@volue/design-colors 2.0.4-next.0 → 3.0.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  Color primitives/tokens to be used across Volue's products
4
4
 
5
- ![Screenshot](https://user-images.githubusercontent.com/927591/106161718-9f898080-6187-11eb-99ca-734cf79ee3b5.png)
6
-
7
5
  ## Installation
8
6
 
9
7
  ```sh
@@ -21,14 +19,27 @@ Tokens are exported as nested object structure.
21
19
 
22
20
  ```js
23
21
  const tokens = require('@volue/design-colors');
24
- console.log(tokens.palette.colorBlue100); // rgb(38, 115, 170)
22
+ console.log(tokens.core.blue100); // rgb(0, 133, 159)
23
+ console.log(tokens.background.surface.default);
24
+ ```
25
+
26
+ #### Flat tokens
27
+
28
+ Use `flat` entrypoint to consume flattened tokens:
29
+
30
+ ```js
31
+ const tokens = require('@volue/design-colors/flat');
32
+ console.log(tokens.colorBlue100);
33
+ console.log(tokens.backgroundSurface);
25
34
  ```
26
35
 
36
+ ### JSON
37
+
27
38
  In JSON, design token names are formatted in [SNAKE_CASE](https://en.wikipedia.org/wiki/Snake_case).
28
39
 
29
40
  ```js
30
41
  const tokens = require('@volue/design-colors/dist/index.json');
31
- console.log(tokens['COLOR_BLACK']); // rgb(0, 0, 0)
42
+ console.log(tokens['COLOR_WHITE']); // rgb(255, 255, 255)
32
43
  ```
33
44
 
34
45
  ### Sass
@@ -40,6 +51,18 @@ Sass variables and map keys are formatted in [kebab-case](https://en.wikipedia.o
40
51
  @import '~@volue/design-colors/dist/index';
41
52
 
42
53
  a {
43
- color: $color-accent120;
54
+ color: $color-accent90;
55
+ }
56
+ ```
57
+
58
+ ### CSS variables
59
+
60
+ CSS variables/custom properties are formatted in [kebab-case](https://en.wikipedia.org/wiki/Kebab_case).
61
+
62
+ ```scss
63
+ @import '~@volue/design-colors/dist/index.custom-properties.css';
64
+
65
+ a {
66
+ color: var(--color-accent90);
44
67
  }
45
68
  ```