polaris_tokens 2.2.0 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 90ad5818eaa391e85804bf6ad8cbd55a7a03a71fc110ac27c292380b6cefc647
4
- data.tar.gz: 3a31c0ebbd0476f7b7e503f395fc22ca5f6521fff4475247892d17c10fbe8794
3
+ metadata.gz: 4ee99caf6b099795b84dbbba56012a67a41013c12a2a322d18a53162f806b8f4
4
+ data.tar.gz: 91f4a5abd1b82cfd981c82aec2a2f394cf256ca632a709d5d515daea222433c8
5
5
  SHA512:
6
- metadata.gz: 185e53dba32775e14214fd385d563fb096281b44bf83d1d14af777a2eb42e373eff22c32ce4e0cdb94d4b9ade292cafbf631898964fd38a982247e2812683cb3
7
- data.tar.gz: 51659776505fcd0478dbfe731a858ae51f61b2ab3a164200092c7fd6fa25a41b0b0610682021df6cf4a5dbea34c357f00fd04a80cf89a5eb09fa0d800e0fbe93
6
+ metadata.gz: 93ac987889f431b0a13a0f60024c11c0f3e7f15a6dd74811d18c23717f7e8639a911f23c48f4e84fccdc569ec8fedcf45ba5546df39597737612265766dc7219
7
+ data.tar.gz: ca5bbe48a5ad7af8ce40782b1002568d574e82c7cf984517161fe5c7aea4b23e61999b6d0e90a1d4542af029f5fc45d0e3e8721961c867739322e513ec500885
data/README.md CHANGED
@@ -92,10 +92,10 @@ a {
92
92
  }
93
93
 
94
94
  // Using the map for a specific type of tokens (here: spacing)
95
- @import '~@shopify/polaris-tokens/dist/spacing.map';
95
+ @import '~@shopify/polaris-tokens/dist/spacing.spacing-map';
96
96
 
97
97
  a {
98
- color: map-get($polaris-spacing-map, 'spacing-loose');
98
+ color: map-get($polaris-spacing-map, 'loose');
99
99
  }
100
100
  ```
101
101
 
@@ -127,7 +127,7 @@ polaris_colors['color-blue-lighter'] # "rgb(235, 245, 250)"
127
127
 
128
128
  Color tokens include a [CSS Filter](https://developer.mozilla.org/en-US/docs/Web/CSS/filter) (`filter`) value as part of [their metadata](https://github.com/Shopify/polaris-tokens/blob/master/data/color-metadata.yml). When this filter is applied to an element, it will change that element’s color to _approximate_ the target token color.
129
129
 
130
- ```html
130
+ ```
131
131
  <div>
132
132
  No background, no filter
133
133
  </div>
@@ -136,15 +136,11 @@ Color tokens include a [CSS Filter](https://developer.mozilla.org/en-US/docs/Web
136
136
  White background, no filter
137
137
  </div>
138
138
 
139
- <div
140
- style="filter: brightness(0) saturate(100%) invert(28%) sepia(67%) saturate(3622%) hue-rotate(353deg) brightness(89%) contrast(95%)"
141
- >
139
+ <div style="filter: brightness(0) saturate(100%) invert(28%) sepia(67%) saturate(3622%) hue-rotate(353deg) brightness(89%) contrast(95%)">
142
140
  No background, red filter
143
141
  </div>
144
142
 
145
- <div
146
- style="background-color: #fff; filter: brightness(0) saturate(100%) invert(28%) sepia(67%) saturate(3622%) hue-rotate(353deg) brightness(89%) contrast(95%)"
147
- >
143
+ <div style="background-color: #fff; filter: brightness(0) saturate(100%) invert(28%) sepia(67%) saturate(3622%) hue-rotate(353deg) brightness(89%) contrast(95%)">
148
144
  White background, red filter
149
145
  </div>
150
146
  ```
@@ -155,21 +151,12 @@ In general, these filters shouldn’t be used unless absolutely necessary. The m
155
151
 
156
152
  CSS filters allow us the safety of rendering SVGs inside `img` elements, but still give us control over their appearance.
157
153
 
158
- ```html
154
+ ```
159
155
  <div>
160
- <img
161
- src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='50' height='50'><circle cx='20' cy='20' r='16' /></svg>"
162
- alt=""
163
- />
164
- black circle, no filter
156
+ <img src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='50' height='50'><circle cx='20' cy='20' r='16' /></svg>" alt="" /> black circle, no filter
165
157
  </div>
166
158
  <div>
167
- <img
168
- src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='50' height='50'><circle cx='20' cy='20' r='16' /></svg>"
169
- style="filter: brightness(0) saturate(100%) invert(28%) sepia(67%) saturate(3622%) hue-rotate(353deg) brightness(89%) contrast(95%)"
170
- alt=""
171
- />
172
- black circle, red filter
159
+ <img src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='50' height='50'><circle cx='20' cy='20' r='16' /></svg>" style="filter: brightness(0) saturate(100%) invert(28%) sepia(67%) saturate(3622%) hue-rotate(353deg) brightness(89%) contrast(95%)" alt="" /> black circle, red filter
173
160
  </div>
174
161
  ```
175
162
 
@@ -177,21 +164,12 @@ CSS filters allow us the safety of rendering SVGs inside `img` elements, but sti
177
164
 
178
165
  Note that _all_ filled areas of an SVG will change color with this approach, including borders/strokes. For that reason it should only be used with monochromatic SVGs.
179
166
 
180
- ```html
167
+ ```
181
168
  <div>
182
- <img
183
- src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='50' height='50'><circle cx='20' cy='20' r='16' stroke='green' stroke-width='4' /></svg>"
184
- alt=""
185
- />
186
- black circle with green border, no filter
169
+ <img src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='50' height='50'><circle cx='20' cy='20' r='16' stroke='green' stroke-width='4' /></svg>" alt="" /> black circle with green border, no filter
187
170
  </div>
188
171
  <div>
189
- <img
190
- src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='50' height='50'><circle cx='20' cy='20' r='16' stroke='green' stroke-width='4' /></svg>"
191
- style="filter: brightness(0) saturate(100%) invert(28%) sepia(67%) saturate(3622%) hue-rotate(353deg) brightness(89%) contrast(95%)"
192
- alt=""
193
- />
194
- black circle with green border, red filter
172
+ <img src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='50' height='50'><circle cx='20' cy='20' r='16' stroke='green' stroke-width='4' /></svg>" style="filter: brightness(0) saturate(100%) invert(28%) sepia(67%) saturate(3622%) hue-rotate(353deg) brightness(89%) contrast(95%)" alt="" /> black circle with green border, red filter
195
173
  </div>
196
174
  ```
197
175
 
@@ -0,0 +1,9 @@
1
+ $polaris-spacing: (
2
+ 'none': 0,
3
+ 'extra-tight': 4px,
4
+ 'tight': 8px,
5
+ 'base-tight': 12px,
6
+ 'base': 16px,
7
+ 'loose': 20px,
8
+ 'extra-loose': 32px,
9
+ );
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopify/polaris-tokens",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Design Tokens for the Polaris Design System",
5
5
  "main": "index.js",
6
6
  "types": "dist/index.d.ts",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polaris_tokens
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-19 00:00:00.000000000 Z
11
+ date: 2019-02-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Design Tokens for the Polaris Design System
14
14
  email:
@@ -51,6 +51,7 @@ files:
51
51
  - dist/spacing.map.scss
52
52
  - dist/spacing.raw.json
53
53
  - dist/spacing.scss
54
+ - dist/spacing.spacing-map.scss
54
55
  - dist/typography.common.js
55
56
  - dist/typography.custom-properties.css
56
57
  - dist/typography.json