@transferwise/neptune-css 0.0.0-experimental-85c7589 → 0.0.0-experimental-5a67c0d

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@transferwise/neptune-css",
3
3
  "description": "Neptune CSS library",
4
- "version": "0.0.0-experimental-85c7589",
4
+ "version": "0.0.0-experimental-5a67c0d",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -49,11 +49,8 @@ h6,
49
49
  .title-1,
50
50
  h1,
51
51
  .np-text-title-screen {
52
+ &:extend(.wds-text-title-screen);
52
53
  margin-bottom: initial;
53
- font-size: var(--font-size-30);
54
- font-weight: var(--font-weight-semi-bold);
55
- letter-spacing: -0.021em;
56
- line-height: 115%;
57
54
  }
58
55
 
59
56
  /* DEPRECATED: use .np-text-title-section instead */
@@ -62,11 +59,8 @@ h1,
62
59
  .title-2,
63
60
  h2,
64
61
  .np-text-title-section {
62
+ &:extend(.wds-text-title-section);
65
63
  margin-bottom: initial;
66
- font-weight: var(--font-weight-semi-bold);
67
- font-size: var(--font-size-26);
68
- letter-spacing: -0.02em;
69
- line-height: 122%;
70
64
  }
71
65
 
72
66
  /* DEPRECATED: use .np-text-title-subsection instead */
@@ -75,11 +69,8 @@ h2,
75
69
  .title-3,
76
70
  h3,
77
71
  .np-text-title-subsection {
72
+ &:extend(.wds-text-title-subsection);
78
73
  margin-bottom: initial;
79
- font-size: var(--font-size-22);
80
- font-weight: var(--font-weight-semi-bold);
81
- letter-spacing: -0.018em;
82
- line-height: 125%;
83
74
  }
84
75
 
85
76
  /* DEPRECATED: use .np-text-title-body instead */
@@ -88,10 +79,7 @@ h3,
88
79
  .title-4,
89
80
  h4,
90
81
  .np-text-title-body {
91
- font-size: var(--font-size-18);
92
- font-weight: var(--font-weight-semi-bold);
93
- letter-spacing: -0.014em;
94
- line-height: 135%;
82
+ &:extend(.wds-text-title-body);
95
83
  }
96
84
 
97
85
  /* DEPRECATED: use .np-text-title-group instead */
@@ -102,10 +90,7 @@ h4,
102
90
  h5,
103
91
  h6,
104
92
  .np-text-title-group {
105
- font-weight: var(--font-weight-medium);
106
- font-size: var(--font-size-14);
107
- letter-spacing: -0.006em;
108
- line-height: 140%;
93
+ &:extend(.wds-text-title-group);
109
94
  }
110
95
 
111
96
  /* DEPRECATED: use .np-text-title-body instead */
@@ -131,10 +116,7 @@ h6,
131
116
  body,
132
117
  small,
133
118
  .np-text-body-default {
134
- font-size: var(--font-size-14);
135
- line-height: 155%;
136
- letter-spacing: -0.006em;
137
- font-weight: var(--font-weight-regular);
119
+ &:extend(.wds-text-body-default);
138
120
  .np-text-hyphenated;
139
121
  }
140
122
 
@@ -146,10 +128,7 @@ small,
146
128
  .label, .control-label,
147
129
 
148
130
  .np-text-body-default-bold {
149
- font-size: var(--font-size-14);
150
- line-height: 155%;
151
- letter-spacing: -0.006em;
152
- font-weight: var(--font-weight-semi-bold);
131
+ &:extend(.wds-text-body-default-bold);
153
132
  .np-text-hyphenated;
154
133
  }
155
134
 
@@ -158,10 +137,7 @@ small,
158
137
  .body-1,
159
138
  .value,
160
139
  .np-text-body-large {
161
- font-weight: var(--font-weight-regular);
162
- font-size: var(--font-size-16);
163
- line-height: 150%;
164
- letter-spacing: -0.011em;
140
+ &:extend(.wds-text-body-large);
165
141
  .np-text-hyphenated;
166
142
  }
167
143
 
@@ -169,10 +145,7 @@ small,
169
145
  /* stylelint-disable-next-line selector-list-comma-newline-after */
170
146
  .control-1,
171
147
  .np-text-body-large-bold {
172
- font-weight: var(--font-weight-semi-bold);
173
- font-size: var(--font-size-16);
174
- line-height: 150%;
175
- letter-spacing: -0.011em;
148
+ &:extend(.wds-text-body-large-bold);
176
149
  .np-text-hyphenated;
177
150
  }
178
151
 
@@ -199,19 +172,21 @@ a,
199
172
 
200
173
  // DISPLAY
201
174
 
175
+ /* DEPRECATED: use .wds-text-display-number-small instead */
202
176
  .np-text-display-number {
203
- font-weight: var(--font-weight-semi-bold);
204
- font-size: 40px;
205
- line-height: 110%;
177
+ &:extend(.wds-text-display-number);
178
+ }
179
+
180
+ .np-text-display-number-small {
181
+ &:extend(.wds-text-display-number-small);
182
+ }
183
+
184
+ .np-text-display-number-medium {
185
+ &:extend(.wds-text-display-number-medium);
206
186
  }
207
187
 
208
- .display-formatting(
209
- @font-size;
210
- @line-height;
211
- @font-weight: var(--font-weight-regular)) {
212
- font-size: @font-size;
213
- line-height: @line-height;
214
- font-weight: @font-weight;
188
+ .np-text-display-number-large {
189
+ &:extend(.wds-text-display-number-large);
215
190
  }
216
191
 
217
192
  .display-1,
@@ -223,28 +198,12 @@ a,
223
198
  .np-text-display-large,
224
199
  .np-text-display-medium,
225
200
  .np-text-display-small {
226
- &,
201
+ font-synthesis: none;
202
+
227
203
  &--forced {
228
204
  font-family: var(--font-family-display);
229
205
  font-synthesis: none;
230
206
  }
231
-
232
- :lang(ja) &,
233
- :lang(th) &,
234
- :lang(zh-CN) &,
235
- :lang(zh-HK) & {
236
- /**
237
- * Wise Sans covers extended Latin glyphs for logged-in experiences and a small subset
238
- * of Japanese ones for the logged out ones (exposed by the Editorial DS). Unfortunately,
239
- * font files are browser-cached and we carried over to launchpad, where it causes issues
240
- * for unsupported locales, especially those that share glyphs, like Japanese and Chinese.
241
- * There are exceptions for small UI parts where Wise Sans is fine or expected — e.g. the
242
- * numeric input of ExpressiveMoneyInput.
243
- * Add `--forced` BEM modifier to the original class name to guarantee it.
244
- */
245
- font-family: var(--font-family-regular);
246
- line-height: var(--line-height-title);
247
- }
248
207
  }
249
208
 
250
209
  /* DEPRECATED(.np-text-display-extra-large): use .np-text-display-large instead */
@@ -252,36 +211,20 @@ a,
252
211
  .np-text-display-large,
253
212
  .np-text-display-medium,
254
213
  .np-text-display-small {
255
- letter-spacing: normal;
256
214
  .np-text-hyphenated;
257
215
  }
258
216
 
259
217
  .np-text-display-extra-large,
260
218
  .np-text-display-large {
261
- .display-formatting(var(--size-64), normal, var(--font-weight-bold));
219
+ &:extend(.wds-text-display-large);
262
220
  }
263
221
 
264
222
  .np-text-display-medium {
265
- .display-formatting(var(--size-52), normal, var(--font-weight-bold));
223
+ &:extend(.wds-text-display-medium);
266
224
  }
267
225
 
268
226
  .np-text-display-small {
269
- .display-formatting(var(--size-40), normal, var(--font-weight-bold));
270
- }
271
-
272
- :lang(en) {
273
- > .np-text-display-extra-large,
274
- > .np-text-display-large {
275
- .display-formatting(var(--size-64), 0.85);
276
- }
277
-
278
- > .np-text-display-medium {
279
- .display-formatting(var(--size-52), 0.85);
280
- }
281
-
282
- > .np-text-display-small {
283
- .display-formatting(var(--size-40), 0.85);
284
- }
227
+ &:extend(.wds-text-display-small);
285
228
  }
286
229
 
287
230
  /* Disable hyphenation for English
@@ -294,117 +237,6 @@ a,
294
237
  hyphens: none;
295
238
  }
296
239
 
297
- :lang(af),
298
- :lang(sq),
299
- :lang(eu),
300
- :lang(bs),
301
- :lang(ca),
302
- :lang(kw),
303
- :lang(hr),
304
- :lang(cs),
305
- :lang(da),
306
- :lang(nl),
307
- :lang(eo),
308
- :lang(et),
309
- :lang(fo),
310
- :lang(fi),
311
- :lang(fr),
312
- :lang(gl),
313
- :lang(lg),
314
- :lang(de),
315
- :lang(hu),
316
- :lang(is),
317
- :lang(se),
318
- :lang(id),
319
- :lang(in),
320
- :lang(ga),
321
- :lang(it),
322
- :lang(kl),
323
- :lang(ki),
324
- :lang(rw),
325
- :lang(lv),
326
- :lang(lt),
327
- :lang(lb),
328
- :lang(mg),
329
- :lang(ms),
330
- :lang(mt),
331
- :lang(gv),
332
- :lang(mi),
333
- :lang(nd),
334
- :lang(nb),
335
- :lang(nn),
336
- :lang(om),
337
- :lang(pl),
338
- :lang(pt),
339
- :lang(ro),
340
- :lang(rm),
341
- :lang(rn),
342
- :lang(sg),
343
- :lang(gd),
344
- :lang(sr),
345
- :lang(sn),
346
- :lang(sk),
347
- :lang(sl),
348
- :lang(so),
349
- :lang(es),
350
- :lang(sw),
351
- :lang(sv),
352
- :lang(tr),
353
- :lang(cy),
354
- :lang(fy),
355
- :lang(wo),
356
- :lang(zu),
357
- :lang(hsb),
358
- :lang(gsw),
359
- :lang(dsb),
360
- :lang(fil) {
361
- .np-text-display-extra-large,
362
- .np-text-display-large {
363
- .display-formatting(var(--size-64), 1.05);
364
- }
365
-
366
- .np-text-display-medium {
367
- .display-formatting(var(--size-52), 1.05);
368
- }
369
-
370
- .np-text-display-small {
371
- .display-formatting(var(--size-40), 1.05);
372
- }
373
- }
374
-
375
- :lang(el),
376
- :lang(az),
377
- :lang(be),
378
- :lang(bs),
379
- :lang(bg),
380
- :lang(ce),
381
- :lang(mk),
382
- :lang(os),
383
- :lang(ru),
384
- :lang(sr),
385
- :lang(uk),
386
- :lang(uz),
387
- :lang(sah) {
388
- .np-text-display-extra-large,
389
- .np-text-display-large {
390
- .display-formatting(var(--size-60),
391
- 120%,
392
- var(--font-weight-semi-bold));
393
- }
394
-
395
- .np-text-display-medium {
396
- .display-formatting(var(--size-48),
397
- 120%,
398
- var(--font-weight-semi-bold));
399
- }
400
-
401
- .np-text-display-small {
402
- .display-formatting(var(--size-40),
403
- 120%,
404
- var(--font-weight-semi-bold));
405
- }
406
- }
407
-
408
240
  /* DEPRECATED: use `.np-text-display-*` instead */
409
241
  .display-1 {
410
242
  margin-bottom: var(--size-24);
@@ -10,6 +10,10 @@
10
10
  @import "@transferwise/neptune-tokens/themes/business--dark/tokens.css";
11
11
  @import "@transferwise/neptune-tokens/themes/business--forest-green/tokens.css";
12
12
  @import "@transferwise/neptune-tokens/themes/business--bright-green/tokens.css";
13
+ @import "@transferwise/neptune-tokens/text/tokens.css";
14
+
15
+ // Utilities
16
+ @import (less) "@transferwise/neptune-tokens/text/utilities.css";
13
17
  @import "./core/_fonts.less";
14
18
  @import "./core/_scaffolding.less";
15
19
  @import "./core/_typography.less";
File without changes
File without changes