@carbon/type 10.0.0-rc.0 → 10.2.0

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.
Files changed (44) hide show
  1. package/CHANGELOG.md +525 -0
  2. package/LICENSE +2 -2
  3. package/README.md +25 -21
  4. package/es/index.js +26 -38
  5. package/lib/index.js +31 -37
  6. package/package.json +7 -7
  7. package/scss/_classes.scss +3 -0
  8. package/scss/_font-family.scss +17 -4
  9. package/scss/_inlined/_classes.scss +41 -0
  10. package/scss/_inlined/_font-family.scss +70 -0
  11. package/scss/_inlined/_prefix.scss +11 -0
  12. package/scss/_inlined/_reset.scss +43 -0
  13. package/scss/_inlined/_scale.scss +59 -0
  14. package/scss/_inlined/_styles.scss +673 -0
  15. package/scss/_inlined/font-face/_mono.scss +430 -0
  16. package/scss/_inlined/font-face/_sans.scss +497 -0
  17. package/scss/_inlined/font-face/_serif.scss +430 -0
  18. package/scss/_inlined/font-face/_settings.scss +12 -0
  19. package/scss/_prefix.scss +3 -0
  20. package/scss/_reset.scss +20 -7
  21. package/scss/_scale.scss +16 -5
  22. package/scss/_styles.scss +145 -49
  23. package/scss/font-face/_mono.scss +41 -0
  24. package/scss/font-face/_sans.scss +144 -36
  25. package/scss/font-face/_serif.scss +77 -36
  26. package/scss/font-face/_settings.scss +12 -0
  27. package/scss/index.scss +11 -0
  28. package/scss/type.scss +4 -4
  29. package/scss/vendor/@carbon/import-once/import-once.scss +27 -0
  30. package/scss/vendor/@carbon/import-once/index.scss +8 -0
  31. package/scss/vendor/@carbon/layout/_breakpoint.scss +237 -0
  32. package/scss/vendor/@carbon/layout/_convert.scss +30 -0
  33. package/scss/vendor/@carbon/layout/_key-height.scss +97 -0
  34. package/scss/vendor/@carbon/layout/_mini-unit.scss +23 -0
  35. package/scss/vendor/@carbon/layout/_spacing.scss +328 -0
  36. package/scss/vendor/@carbon/layout/_utilities.scss +41 -0
  37. package/scss/vendor/@carbon/layout/index.scss +8 -0
  38. package/scss/vendor/@carbon/layout/layout.scss +12 -0
  39. package/src/__tests__/__snapshots__/styles-test.js.snap +121 -87
  40. package/src/__tests__/exports-test.js +43 -37
  41. package/src/__tests__/fluid-test.js +0 -1
  42. package/src/reset.js +3 -0
  43. package/src/styles.js +22 -38
  44. package/umd/index.js +31 -37
@@ -0,0 +1,430 @@
1
+ //
2
+ // Copyright IBM Corp. 2018, 2018
3
+ //
4
+ // This source code is licensed under the Apache-2.0 license found in the
5
+ // LICENSE file in the root directory of this source tree.
6
+ //
7
+
8
+ @import 'settings';
9
+
10
+ /// Serif `@font-face`'s
11
+ /// @access public
12
+ /// @group @carbon/type
13
+ @mixin carbon--font-face-serif {
14
+ // .woff support for IE11
15
+ @font-face {
16
+ font-family: 'IBM Plex Serif';
17
+ font-style: italic;
18
+ font-weight: 300;
19
+ font-display: $carbon--font-display;
20
+ src: local('IBM Plex Serif Light Italic'), local('IBMPlexSerif-LightItalic'),
21
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizGREVNn1dOx-zrZ2X3pZvkTiUa454xm1npiw.woff)
22
+ format('woff');
23
+ }
24
+ @font-face {
25
+ font-family: 'IBM Plex Serif';
26
+ font-style: italic;
27
+ font-weight: 400;
28
+ font-display: $carbon--font-display;
29
+ src: local('IBM Plex Serif Italic'), local('IBMPlexSerif-Italic'),
30
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizBREVNn1dOx-zrZ2X3pZvkTiUa6zUTiA.woff)
31
+ format('woff');
32
+ }
33
+ @font-face {
34
+ font-family: 'IBM Plex Serif';
35
+ font-style: italic;
36
+ font-weight: 600;
37
+ font-display: $carbon--font-display;
38
+ src: local('IBM Plex Serif SemiBold Italic'),
39
+ local('IBMPlexSerif-SemiBoldItalic'),
40
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizGREVNn1dOx-zrZ2X3pZvkTiUa4-o3m1npiw.woff)
41
+ format('woff');
42
+ }
43
+ @font-face {
44
+ font-family: 'IBM Plex Serif';
45
+ font-style: normal;
46
+ font-weight: 300;
47
+ font-display: $carbon--font-display;
48
+ src: local('IBM Plex Serif Light'), local('IBMPlexSerif-Light'),
49
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizAREVNn1dOx-zrZ2X3pZvkTi20-SI0q10.woff)
50
+ format('woff');
51
+ }
52
+ @font-face {
53
+ font-family: 'IBM Plex Serif';
54
+ font-style: normal;
55
+ font-weight: 400;
56
+ font-display: $carbon--font-display;
57
+ src: local('IBM Plex Serif'), local('IBMPlexSerif'),
58
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizDREVNn1dOx-zrZ2X3pZvkTiUf2zE.woff)
59
+ format('woff');
60
+ }
61
+ @font-face {
62
+ font-family: 'IBM Plex Serif';
63
+ font-style: normal;
64
+ font-weight: 600;
65
+ font-display: $carbon--font-display;
66
+ src: local('IBM Plex Serif SemiBold'), local('IBMPlexSerif-SemiBold'),
67
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizAREVNn1dOx-zrZ2X3pZvkTi3A_yI0q10.woff)
68
+ format('woff');
69
+ }
70
+
71
+ /* cyrillic-ext */
72
+ @font-face {
73
+ font-family: 'IBM Plex Serif';
74
+ font-style: italic;
75
+ font-weight: 300;
76
+ font-display: $carbon--font-display;
77
+ src: local('IBM Plex Serif Light Italic'), local('IBMPlexSerif-LightItalic'),
78
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizGREVNn1dOx-zrZ2X3pZvkTiUa454xm1TpjfGj7oaMBg.woff2)
79
+ format('woff2');
80
+ unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,
81
+ U+FE2E-FE2F;
82
+ }
83
+ /* cyrillic */
84
+ @font-face {
85
+ font-family: 'IBM Plex Serif';
86
+ font-style: italic;
87
+ font-weight: 300;
88
+ font-display: $carbon--font-display;
89
+ src: local('IBM Plex Serif Light Italic'), local('IBMPlexSerif-LightItalic'),
90
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizGREVNn1dOx-zrZ2X3pZvkTiUa454xm13pjfGj7oaMBg.woff2)
91
+ format('woff2');
92
+ unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
93
+ }
94
+ /* vietnamese */
95
+ @font-face {
96
+ font-family: 'IBM Plex Serif';
97
+ font-style: italic;
98
+ font-weight: 300;
99
+ font-display: $carbon--font-display;
100
+ src: local('IBM Plex Serif Light Italic'), local('IBMPlexSerif-LightItalic'),
101
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizGREVNn1dOx-zrZ2X3pZvkTiUa454xm1bpjfGj7oaMBg.woff2)
102
+ format('woff2');
103
+ unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB;
104
+ }
105
+ /* latin-ext */
106
+ @font-face {
107
+ font-family: 'IBM Plex Serif';
108
+ font-style: italic;
109
+ font-weight: 300;
110
+ font-display: $carbon--font-display;
111
+ src: local('IBM Plex Serif Light Italic'), local('IBMPlexSerif-LightItalic'),
112
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizGREVNn1dOx-zrZ2X3pZvkTiUa454xm1fpjfGj7oaMBg.woff2)
113
+ format('woff2');
114
+ unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,
115
+ U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
116
+ }
117
+ /* latin */
118
+ @font-face {
119
+ font-family: 'IBM Plex Serif';
120
+ font-style: italic;
121
+ font-weight: 300;
122
+ font-display: $carbon--font-display;
123
+ src: local('IBM Plex Serif Light Italic'), local('IBMPlexSerif-LightItalic'),
124
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizGREVNn1dOx-zrZ2X3pZvkTiUa454xm1npjfGj7oY.woff2)
125
+ format('woff2');
126
+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
127
+ U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212,
128
+ U+2215, U+FEFF, U+FFFD;
129
+ }
130
+ /* cyrillic-ext */
131
+ @font-face {
132
+ font-family: 'IBM Plex Serif';
133
+ font-style: italic;
134
+ font-weight: 400;
135
+ font-display: $carbon--font-display;
136
+ src: local('IBM Plex Serif Italic'), local('IBMPlexSerif-Italic'),
137
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizBREVNn1dOx-zrZ2X3pZvkTiUa6zgTjnTLgNuZ5w.woff2)
138
+ format('woff2');
139
+ unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,
140
+ U+FE2E-FE2F;
141
+ }
142
+ /* cyrillic */
143
+ @font-face {
144
+ font-family: 'IBM Plex Serif';
145
+ font-style: italic;
146
+ font-weight: 400;
147
+ font-display: $carbon--font-display;
148
+ src: local('IBM Plex Serif Italic'), local('IBMPlexSerif-Italic'),
149
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizBREVNn1dOx-zrZ2X3pZvkTiUa6zETjnTLgNuZ5w.woff2)
150
+ format('woff2');
151
+ unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
152
+ }
153
+ /* vietnamese */
154
+ @font-face {
155
+ font-family: 'IBM Plex Serif';
156
+ font-style: italic;
157
+ font-weight: 400;
158
+ font-display: $carbon--font-display;
159
+ src: local('IBM Plex Serif Italic'), local('IBMPlexSerif-Italic'),
160
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizBREVNn1dOx-zrZ2X3pZvkTiUa6zoTjnTLgNuZ5w.woff2)
161
+ format('woff2');
162
+ unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB;
163
+ }
164
+ /* latin-ext */
165
+ @font-face {
166
+ font-family: 'IBM Plex Serif';
167
+ font-style: italic;
168
+ font-weight: 400;
169
+ font-display: $carbon--font-display;
170
+ src: local('IBM Plex Serif Italic'), local('IBMPlexSerif-Italic'),
171
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizBREVNn1dOx-zrZ2X3pZvkTiUa6zsTjnTLgNuZ5w.woff2)
172
+ format('woff2');
173
+ unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,
174
+ U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
175
+ }
176
+ /* latin */
177
+ @font-face {
178
+ font-family: 'IBM Plex Serif';
179
+ font-style: italic;
180
+ font-weight: 400;
181
+ font-display: $carbon--font-display;
182
+ src: local('IBM Plex Serif Italic'), local('IBMPlexSerif-Italic'),
183
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizBREVNn1dOx-zrZ2X3pZvkTiUa6zUTjnTLgNs.woff2)
184
+ format('woff2');
185
+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
186
+ U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212,
187
+ U+2215, U+FEFF, U+FFFD;
188
+ }
189
+ /* cyrillic-ext */
190
+ @font-face {
191
+ font-family: 'IBM Plex Serif';
192
+ font-style: italic;
193
+ font-weight: 600;
194
+ font-display: $carbon--font-display;
195
+ src: local('IBM Plex Serif SemiBold Italic'),
196
+ local('IBMPlexSerif-SemiBoldItalic'),
197
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizGREVNn1dOx-zrZ2X3pZvkTiUa4-o3m1TpjfGj7oaMBg.woff2)
198
+ format('woff2');
199
+ unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,
200
+ U+FE2E-FE2F;
201
+ }
202
+ /* cyrillic */
203
+ @font-face {
204
+ font-family: 'IBM Plex Serif';
205
+ font-style: italic;
206
+ font-weight: 600;
207
+ font-display: $carbon--font-display;
208
+ src: local('IBM Plex Serif SemiBold Italic'),
209
+ local('IBMPlexSerif-SemiBoldItalic'),
210
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizGREVNn1dOx-zrZ2X3pZvkTiUa4-o3m13pjfGj7oaMBg.woff2)
211
+ format('woff2');
212
+ unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
213
+ }
214
+ /* vietnamese */
215
+ @font-face {
216
+ font-family: 'IBM Plex Serif';
217
+ font-style: italic;
218
+ font-weight: 600;
219
+ font-display: $carbon--font-display;
220
+ src: local('IBM Plex Serif SemiBold Italic'),
221
+ local('IBMPlexSerif-SemiBoldItalic'),
222
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizGREVNn1dOx-zrZ2X3pZvkTiUa4-o3m1bpjfGj7oaMBg.woff2)
223
+ format('woff2');
224
+ unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB;
225
+ }
226
+ /* latin-ext */
227
+ @font-face {
228
+ font-family: 'IBM Plex Serif';
229
+ font-style: italic;
230
+ font-weight: 600;
231
+ font-display: $carbon--font-display;
232
+ src: local('IBM Plex Serif SemiBold Italic'),
233
+ local('IBMPlexSerif-SemiBoldItalic'),
234
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizGREVNn1dOx-zrZ2X3pZvkTiUa4-o3m1fpjfGj7oaMBg.woff2)
235
+ format('woff2');
236
+ unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,
237
+ U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
238
+ }
239
+ /* latin */
240
+ @font-face {
241
+ font-family: 'IBM Plex Serif';
242
+ font-style: italic;
243
+ font-weight: 600;
244
+ font-display: $carbon--font-display;
245
+ src: local('IBM Plex Serif SemiBold Italic'),
246
+ local('IBMPlexSerif-SemiBoldItalic'),
247
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizGREVNn1dOx-zrZ2X3pZvkTiUa4-o3m1npjfGj7oY.woff2)
248
+ format('woff2');
249
+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
250
+ U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212,
251
+ U+2215, U+FEFF, U+FFFD;
252
+ }
253
+ /* cyrillic-ext */
254
+ @font-face {
255
+ font-family: 'IBM Plex Serif';
256
+ font-style: normal;
257
+ font-weight: 300;
258
+ font-display: $carbon--font-display;
259
+ src: local('IBM Plex Serif Light'), local('IBMPlexSerif-Light'),
260
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizAREVNn1dOx-zrZ2X3pZvkTi20-SI5q1vjitOh3oc.woff2)
261
+ format('woff2');
262
+ unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,
263
+ U+FE2E-FE2F;
264
+ }
265
+ /* cyrillic */
266
+ @font-face {
267
+ font-family: 'IBM Plex Serif';
268
+ font-style: normal;
269
+ font-weight: 300;
270
+ font-display: $carbon--font-display;
271
+ src: local('IBM Plex Serif Light'), local('IBMPlexSerif-Light'),
272
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizAREVNn1dOx-zrZ2X3pZvkTi20-SIwq1vjitOh3oc.woff2)
273
+ format('woff2');
274
+ unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
275
+ }
276
+ /* vietnamese */
277
+ @font-face {
278
+ font-family: 'IBM Plex Serif';
279
+ font-style: normal;
280
+ font-weight: 300;
281
+ font-display: $carbon--font-display;
282
+ src: local('IBM Plex Serif Light'), local('IBMPlexSerif-Light'),
283
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizAREVNn1dOx-zrZ2X3pZvkTi20-SI7q1vjitOh3oc.woff2)
284
+ format('woff2');
285
+ unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB;
286
+ }
287
+ /* latin-ext */
288
+ @font-face {
289
+ font-family: 'IBM Plex Serif';
290
+ font-style: normal;
291
+ font-weight: 300;
292
+ font-display: $carbon--font-display;
293
+ src: local('IBM Plex Serif Light'), local('IBMPlexSerif-Light'),
294
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizAREVNn1dOx-zrZ2X3pZvkTi20-SI6q1vjitOh3oc.woff2)
295
+ format('woff2');
296
+ unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,
297
+ U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
298
+ }
299
+ /* latin */
300
+ @font-face {
301
+ font-family: 'IBM Plex Serif';
302
+ font-style: normal;
303
+ font-weight: 300;
304
+ font-display: $carbon--font-display;
305
+ src: local('IBM Plex Serif Light'), local('IBMPlexSerif-Light'),
306
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizAREVNn1dOx-zrZ2X3pZvkTi20-SI0q1vjitOh.woff2)
307
+ format('woff2');
308
+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
309
+ U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212,
310
+ U+2215, U+FEFF, U+FFFD;
311
+ }
312
+ /* cyrillic-ext */
313
+ @font-face {
314
+ font-family: 'IBM Plex Serif';
315
+ font-style: normal;
316
+ font-weight: 400;
317
+ font-display: $carbon--font-display;
318
+ src: local('IBM Plex Serif'), local('IBMPlexSerif'),
319
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizDREVNn1dOx-zrZ2X3pZvkTiUS2zcZiVbJsNo.woff2)
320
+ format('woff2');
321
+ unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,
322
+ U+FE2E-FE2F;
323
+ }
324
+ /* cyrillic */
325
+ @font-face {
326
+ font-family: 'IBM Plex Serif';
327
+ font-style: normal;
328
+ font-weight: 400;
329
+ font-display: $carbon--font-display;
330
+ src: local('IBM Plex Serif'), local('IBMPlexSerif'),
331
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizDREVNn1dOx-zrZ2X3pZvkTiUb2zcZiVbJsNo.woff2)
332
+ format('woff2');
333
+ unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
334
+ }
335
+ /* vietnamese */
336
+ @font-face {
337
+ font-family: 'IBM Plex Serif';
338
+ font-style: normal;
339
+ font-weight: 400;
340
+ font-display: $carbon--font-display;
341
+ src: local('IBM Plex Serif'), local('IBMPlexSerif'),
342
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizDREVNn1dOx-zrZ2X3pZvkTiUQ2zcZiVbJsNo.woff2)
343
+ format('woff2');
344
+ unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB;
345
+ }
346
+ /* latin-ext */
347
+ @font-face {
348
+ font-family: 'IBM Plex Serif';
349
+ font-style: normal;
350
+ font-weight: 400;
351
+ font-display: $carbon--font-display;
352
+ src: local('IBM Plex Serif'), local('IBMPlexSerif'),
353
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizDREVNn1dOx-zrZ2X3pZvkTiUR2zcZiVbJsNo.woff2)
354
+ format('woff2');
355
+ unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,
356
+ U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
357
+ }
358
+ /* latin */
359
+ @font-face {
360
+ font-family: 'IBM Plex Serif';
361
+ font-style: normal;
362
+ font-weight: 400;
363
+ font-display: $carbon--font-display;
364
+ src: local('IBM Plex Serif'), local('IBMPlexSerif'),
365
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizDREVNn1dOx-zrZ2X3pZvkTiUf2zcZiVbJ.woff2)
366
+ format('woff2');
367
+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
368
+ U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212,
369
+ U+2215, U+FEFF, U+FFFD;
370
+ }
371
+ /* cyrillic-ext */
372
+ @font-face {
373
+ font-family: 'IBM Plex Serif';
374
+ font-style: normal;
375
+ font-weight: 600;
376
+ font-display: $carbon--font-display;
377
+ src: local('IBM Plex Serif SemiBold'), local('IBMPlexSerif-SemiBold'),
378
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizAREVNn1dOx-zrZ2X3pZvkTi3A_yI5q1vjitOh3oc.woff2)
379
+ format('woff2');
380
+ unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,
381
+ U+FE2E-FE2F;
382
+ }
383
+ /* cyrillic */
384
+ @font-face {
385
+ font-family: 'IBM Plex Serif';
386
+ font-style: normal;
387
+ font-weight: 600;
388
+ font-display: $carbon--font-display;
389
+ src: local('IBM Plex Serif SemiBold'), local('IBMPlexSerif-SemiBold'),
390
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizAREVNn1dOx-zrZ2X3pZvkTi3A_yIwq1vjitOh3oc.woff2)
391
+ format('woff2');
392
+ unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
393
+ }
394
+ /* vietnamese */
395
+ @font-face {
396
+ font-family: 'IBM Plex Serif';
397
+ font-style: normal;
398
+ font-weight: 600;
399
+ font-display: $carbon--font-display;
400
+ src: local('IBM Plex Serif SemiBold'), local('IBMPlexSerif-SemiBold'),
401
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizAREVNn1dOx-zrZ2X3pZvkTi3A_yI7q1vjitOh3oc.woff2)
402
+ format('woff2');
403
+ unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB;
404
+ }
405
+ /* latin-ext */
406
+ @font-face {
407
+ font-family: 'IBM Plex Serif';
408
+ font-style: normal;
409
+ font-weight: 600;
410
+ font-display: $carbon--font-display;
411
+ src: local('IBM Plex Serif SemiBold'), local('IBMPlexSerif-SemiBold'),
412
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizAREVNn1dOx-zrZ2X3pZvkTi3A_yI6q1vjitOh3oc.woff2)
413
+ format('woff2');
414
+ unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,
415
+ U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
416
+ }
417
+ /* latin */
418
+ @font-face {
419
+ font-family: 'IBM Plex Serif';
420
+ font-style: normal;
421
+ font-weight: 600;
422
+ font-display: $carbon--font-display;
423
+ src: local('IBM Plex Serif SemiBold'), local('IBMPlexSerif-SemiBold'),
424
+ url(https://fonts.gstatic.com/s/ibmplexserif/v7/jizAREVNn1dOx-zrZ2X3pZvkTi3A_yI0q1vjitOh.woff2)
425
+ format('woff2');
426
+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
427
+ U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212,
428
+ U+2215, U+FEFF, U+FFFD;
429
+ }
430
+ }
@@ -0,0 +1,12 @@
1
+ //
2
+ // Copyright IBM Corp. 2018, 2018
3
+ //
4
+ // This source code is licensed under the Apache-2.0 license found in the
5
+ // LICENSE file in the root directory of this source tree.
6
+ //
7
+
8
+ /// Defines how font files are loaded and displayed by the browser
9
+ /// @link https://css-tricks.com/almanac/properties/f/font-display/
10
+ /// @access public
11
+ /// @group @carbon/type
12
+ $carbon--font-display: auto !default;
package/scss/_prefix.scss CHANGED
@@ -5,4 +5,7 @@
5
5
  // LICENSE file in the root directory of this source tree.
6
6
  //
7
7
 
8
+ /// @type String
9
+ /// @access public
10
+ /// @group @carbon/type
8
11
  $prefix: 'bx' !default;
package/scss/_reset.scss CHANGED
@@ -8,23 +8,36 @@
8
8
  @import '@carbon/layout/scss/convert';
9
9
  @import 'font-family';
10
10
 
11
- /// Include a type reset that individuals can use in their projects for
12
- /// consistent rendering
13
- @mixin carbon--type-reset() {
11
+ /// Include a type reset for a given body and mono font family
12
+ /// @param {Number} $base-font-size [$carbon--base-font-size] - The base font size for your document
13
+ /// @param {String} $body-font-family [carbon--font-family('sans')] - The font family used on the `<body>` element
14
+ /// @param {String} $mono-font-family [carbon--font-family('mono')] - The font family used on elements that require mono fonts, like the `<code>` element
15
+ /// @access public
16
+ /// @group @carbon/type
17
+ @mixin carbon--type-reset(
18
+ $base-font-size: $carbon--base-font-size,
19
+ $body-font-family: carbon--font-family('sans'),
20
+ $mono-font-family: carbon--font-family('mono')
21
+ ) {
14
22
  html {
15
- font-size: $carbon--base-font-size;
23
+ font-size: $base-font-size;
16
24
  }
17
25
 
18
26
  body {
19
- @include carbon--font-family('sans');
20
- @include carbon--font-weight('regular');
21
-
27
+ font-family: $body-font-family;
28
+ font-weight: 400;
22
29
  text-rendering: optimizeLegibility;
23
30
  -webkit-font-smoothing: antialiased;
24
31
  -moz-osx-font-smoothing: grayscale;
25
32
  }
26
33
 
34
+ // IBM Plex uses semibold instead of bold, as a result we need to map
35
+ // tags that use `font-weight: bold` to the semibold value
27
36
  strong {
28
37
  font-weight: 600;
29
38
  }
39
+
40
+ code {
41
+ font-family: $mono-font-family;
42
+ }
30
43
  }
package/scss/_scale.scss CHANGED
@@ -9,7 +9,9 @@
9
9
 
10
10
  /// Compute the type size for the given type scale step
11
11
  /// @param {Number} $step
12
- /// @return {px}
12
+ /// @return {Number} In px
13
+ /// @access public
14
+ /// @group @carbon/type
13
15
  @function carbon--get-type-size($step) {
14
16
  @if $step == 1 {
15
17
  @return 12px;
@@ -18,8 +20,10 @@
18
20
  @return carbon--get-type-size($step - 1) + (floor(($step - 2) / 4) + 1) * 2;
19
21
  }
20
22
 
21
- /// Our type scale. Follows a custom formula for determining each step size.
22
- /// Supports sizes from 12px to 92px.
23
+ /// Type scole follows a custom formula for determining each step size and supports sizes from 12px to 92px
24
+ /// @type Map
25
+ /// @access public
26
+ /// @group @carbon/type
23
27
  $carbon--type-scale: ();
24
28
  @for $i from 1 through 23 {
25
29
  $carbon--type-scale: append(
@@ -30,19 +34,26 @@ $carbon--type-scale: ();
30
34
 
31
35
  /// Get the value of a specific step in the typescale
32
36
  /// @param {Number} $step
33
- /// @return {rem}
37
+ /// @return {Number} In rem
38
+ /// @access public
39
+ /// @group @carbon/type
34
40
  @function carbon--type-scale($step) {
35
41
  @return nth($carbon--type-scale, $step);
36
42
  }
37
43
 
38
- /// Set the font-size value of a selector with the value at the given $step
44
+ /// Set the font-size value of a selector with the value at the given `$step`
39
45
  /// @param {Number} $step
46
+ /// @access public
47
+ /// @group @carbon/type
40
48
  @mixin carbon--type-scale($step) {
41
49
  font-size: carbon--type-scale($step);
42
50
  }
43
51
 
44
52
  /// Alias of `type-scale` mixin.
45
53
  /// @param {Number} $step
54
+ /// @alias carbon--type-scale
55
+ /// @access public
56
+ /// @group @carbon/type
46
57
  @mixin carbon--font-size($step) {
47
58
  font-size: carbon--type-scale($step);
48
59
  }