@ilo-org/styles 0.15.0 → 0.16.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/package.json CHANGED
@@ -1,25 +1,46 @@
1
1
  {
2
2
  "name": "@ilo-org/styles",
3
3
  "description": "Styles for products using ILO's Design System",
4
- "version": "0.15.0",
4
+ "version": "0.16.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/international-labour-organization/designsystem.git",
8
8
  "directory": "packages/styles"
9
9
  },
10
+ "files": [
11
+ "css/**/*",
12
+ "scss/**/*"
13
+ ],
14
+ "contributors": [
15
+ {
16
+ "name": "Justin Smith",
17
+ "email": "smithj@ilo.org",
18
+ "url": "https://github.com/justintemps"
19
+ },
20
+ {
21
+ "name": "Prabashwara Seneviratne",
22
+ "url": "https://www.bash.lk"
23
+ },
24
+ {
25
+ "name": "Shashika Boteju",
26
+ "email": "Shashikaboteju3@gmail.com",
27
+ "url": "https://github.com/Shashika6"
28
+ },
29
+ {
30
+ "name": "Giorgi Kapanadze",
31
+ "email": "doublegkapanadze@gmail.com",
32
+ "url": "https://github.com/ggkapanadze"
33
+ }
34
+ ],
10
35
  "publishConfig": {
11
36
  "access": "public"
12
37
  },
13
38
  "author": "@justintemps, @johnpauldavis, @avrilpearl, @ghlost",
14
39
  "license": "Apache-2.0",
15
- "files": [
16
- "scss",
17
- "css"
18
- ],
19
40
  "dependencies": {
20
- "@ilo-org/fonts": "0.1.2",
21
- "@ilo-org/icons": "0.2.1",
22
- "@ilo-org/themes": "0.7.2"
41
+ "@ilo-org/fonts": "0.2.1",
42
+ "@ilo-org/icons": "0.3.1",
43
+ "@ilo-org/themes": "0.8.1"
23
44
  },
24
45
  "devDependencies": {
25
46
  "del": "^7.0.0",
package/scss/_mixins.scss CHANGED
@@ -412,3 +412,77 @@
412
412
  $spacing-hero-card-corner-cut-height-sm
413
413
  auto;
414
414
  }
415
+
416
+ // ======================================
417
+ // List with markers that don't get chopped
418
+ // off by containers with overflow: hidden;
419
+ // Applies list styles to the List component
420
+ // and also lists in RichText.
421
+ // ======================================
422
+
423
+ @mixin invincible-list {
424
+ // Ordered list shows numbers
425
+ ol {
426
+ counter-reset: item;
427
+
428
+ li {
429
+ counter-increment: item;
430
+ display: table;
431
+ }
432
+
433
+ li::before {
434
+ content: counter(item) ".";
435
+ display: table-cell;
436
+ text-align: right;
437
+ padding-inline-end: spacing(2);
438
+ }
439
+ }
440
+
441
+ // Unordered list shows triangles
442
+ ul {
443
+ li {
444
+ position: relative;
445
+ padding-inline-start: spacing(6);
446
+
447
+ &::before {
448
+ content: "";
449
+ position: absolute;
450
+ height: px-to-rem(14px);
451
+ width: px-to-rem(12px);
452
+ top: px-to-rem(6px);
453
+ @include dataurlicon("listarrow", $color-base-neutrals-light);
454
+ background-repeat: no-repeat;
455
+
456
+ // Left takes precedence in LTR layouts
457
+ // Right takes precents in RTL layouts
458
+ left: 0;
459
+ right: 0;
460
+
461
+ // We have to rotate the bullet in RTL
462
+ [dir="rtl"] & {
463
+ transform: rotate(180deg);
464
+ }
465
+
466
+ @include breakpoint("medium") {
467
+ top: px-to-rem(7px);
468
+ }
469
+ }
470
+ }
471
+ }
472
+
473
+ li {
474
+ @include font-styles("body-small");
475
+ font-family: $fonts-copy;
476
+ margin-bottom: spacing(4);
477
+
478
+ b,
479
+ strong {
480
+ font-weight: 700;
481
+ letter-spacing: $type-label-small-letter-spacing;
482
+ }
483
+
484
+ @include breakpoint("medium") {
485
+ @include font-styles("base");
486
+ }
487
+ }
488
+ }
@@ -3,63 +3,9 @@
3
3
  @import "../mixins";
4
4
 
5
5
  .ilo--list {
6
- &--ordered {
7
- list-style: decimal;
8
- }
9
-
10
- &--unordered {
11
- list-style: initial;
12
- list-style-type: none;
13
-
14
- li {
15
- &::before {
16
- content: "";
17
- display: inline-block;
18
- height: px-to-rem(14px);
19
- left: px-to-rem(-12px);
20
- position: absolute;
21
- top: 6px;
22
- width: px-to-rem(12px);
23
- @include dataurlicon("listarrow", $color-base-neutrals-light);
24
- }
25
- margin-left: spacing(3);
26
- padding-left: spacing(2);
27
- position: relative;
28
- }
29
- }
6
+ @include invincible-list;
30
7
 
31
- &--unstyled {
32
- list-style: none;
33
-
34
- .ilo--list__item {
35
- margin-left: 0;
36
- padding-left: 0;
37
- }
38
- }
39
-
40
- &--horizontal {
41
- li {
42
- &::before {
43
- content: none;
44
- }
45
- }
46
- display: flex;
47
- list-style: none;
48
-
49
- .ilo--list__title {
50
- margin-bottom: spacing(2);
51
- margin-right: spacing(9);
52
- }
53
-
54
- .ilo--list__item {
55
- margin-bottom: spacing(2);
56
- margin-left: 0;
57
- margin-right: spacing(10);
58
- padding-left: 0;
59
- }
60
- }
61
-
62
- &__title {
8
+ &--title {
63
9
  @include font-styles("headline-6");
64
10
  margin-bottom: spacing(6);
65
11
  font-family: $fonts-display;
@@ -70,22 +16,35 @@
70
16
  }
71
17
  }
72
18
 
73
- &__item {
74
- @include font-styles("body-small");
19
+ &__unstyled {
20
+ ol,
21
+ ul {
22
+ list-style: none;
75
23
 
76
- font-family: $fonts-copy;
77
- margin-bottom: spacing(4);
78
- margin-left: spacing(5);
79
- padding-left: spacing(1);
80
-
81
- b,
82
- strong {
83
- font-weight: 700;
84
- letter-spacing: $type-label-small-letter-spacing;
24
+ li {
25
+ padding-inline-start: 0;
26
+ &::before {
27
+ content: none;
28
+ }
29
+ }
85
30
  }
31
+ }
86
32
 
87
- @include breakpoint("medium") {
88
- @include font-styles("base");
33
+ &__horizontal {
34
+ &,
35
+ ul,
36
+ ol {
37
+ display: flex;
38
+ flex-flow: row;
39
+ list-style: none;
40
+ gap: spacing(10);
41
+
42
+ li {
43
+ padding: 0;
44
+ &::before {
45
+ content: none;
46
+ }
47
+ }
89
48
  }
90
49
  }
91
50
  }
@@ -41,6 +41,10 @@
41
41
  );
42
42
  }
43
43
 
44
+ article {
45
+ margin-bottom: spacing(14);
46
+ }
47
+
44
48
  iframe {
45
49
  margin-bottom: spacing(14);
46
50
  }
@@ -95,7 +99,7 @@
95
99
  "body-small",
96
100
  "copy"
97
101
  );
98
- @include font-styles("rich-text-heading-1");
102
+ @include font-styles("rich-text-heading-1-md");
99
103
  }
100
104
 
101
105
  h2 {
@@ -107,7 +111,7 @@
107
111
  "body-small",
108
112
  "copy"
109
113
  );
110
- @include font-styles("rich-text-heading-2");
114
+ @include font-styles("rich-text-heading-2-md");
111
115
  }
112
116
 
113
117
  h3 {
@@ -119,7 +123,7 @@
119
123
  "body-small",
120
124
  "copy"
121
125
  );
122
- @include font-styles("rich-text-heading-3");
126
+ @include font-styles("rich-text-heading-3-md");
123
127
  }
124
128
 
125
129
  h4 {
@@ -131,7 +135,7 @@
131
135
  "body-small",
132
136
  "copy"
133
137
  );
134
- @include font-styles("rich-text-heading-4");
138
+ @include font-styles("rich-text-heading-4-md");
135
139
  }
136
140
 
137
141
  h5 {
@@ -143,36 +147,7 @@
143
147
  "body-small",
144
148
  "copy"
145
149
  );
146
- @include font-styles("rich-text-heading-5");
147
- }
148
-
149
- ul,
150
- ol {
151
- li {
152
- margin-bottom: spacing(8);
153
- margin-left: spacing(5);
154
- padding-left: spacing(3);
155
- position: relative;
156
- }
157
-
158
- margin-bottom: spacing(8);
159
- }
160
-
161
- ul {
162
- li {
163
- margin-left: spacing(3);
164
-
165
- &::before {
166
- content: "";
167
- display: inline-block;
168
- height: px-to-rem(14px);
169
- left: px-to-rem(-12px);
170
- position: absolute;
171
- top: 6px;
172
- width: px-to-rem(12px);
173
- @include dataurlicon("listarrow", $color-base-neutrals-light);
174
- }
175
- }
150
+ @include font-styles("rich-text-heading-5-md");
176
151
  }
177
152
 
178
153
  blockquote {
@@ -186,7 +161,7 @@
186
161
  padding: spacing(19) 0 spacing(9) spacing(8); // check
187
162
  position: relative;
188
163
  width: fit-content;
189
- @include dataurlicon("triangle", $color-ux-background-default);
164
+ @include cornercut(72px, 40px);
190
165
 
191
166
  p {
192
167
  color: $color-font-blockquote;
@@ -229,6 +204,9 @@
229
204
  }
230
205
  }
231
206
 
207
+ // Repeat list styles from the list component
208
+ @include invincible-list;
209
+
232
210
  @include breakpoint("medium") {
233
211
  @include font-styles("base");
234
212
 
@@ -249,7 +227,7 @@
249
227
  "body-large",
250
228
  "copy"
251
229
  );
252
- @include font-styles("rich-text-heading-1-md");
230
+ @include font-styles("rich-text-heading-1");
253
231
  }
254
232
 
255
233
  h2 {
@@ -261,7 +239,7 @@
261
239
  "body-large",
262
240
  "copy"
263
241
  );
264
- @include font-styles("rich-text-heading-2-md");
242
+ @include font-styles("rich-text-heading-2");
265
243
  }
266
244
 
267
245
  h3 {
@@ -273,7 +251,7 @@
273
251
  "body-large",
274
252
  "copy"
275
253
  );
276
- @include font-styles("rich-text-heading-3-md");
254
+ @include font-styles("rich-text-heading-3");
277
255
  }
278
256
 
279
257
  h4 {
@@ -285,7 +263,7 @@
285
263
  "body-large",
286
264
  "copy"
287
265
  );
288
- @include font-styles("rich-text-heading-4-md");
266
+ @include font-styles("rich-text-heading-4");
289
267
  }
290
268
 
291
269
  h5 {
@@ -297,7 +275,7 @@
297
275
  "body-large",
298
276
  "copy"
299
277
  );
300
- @include font-styles("rich-text-heading-5-md");
278
+ @include font-styles("rich-text-heading-5");
301
279
  }
302
280
 
303
281
  p {
@@ -353,6 +331,7 @@
353
331
  background-size: px-to-rem(86px) px-to-rem(48px);
354
332
  margin: spacing(8) 0 spacing(19) 0;
355
333
  padding: spacing(16) 0 spacing(12) spacing(12);
334
+ @include cornercut(86px, 48px);
356
335
 
357
336
  p {
358
337
  margin-bottom: spacing(6);
@@ -381,32 +360,10 @@
381
360
  padding-right: spacing(2);
382
361
  }
383
362
 
384
- ul,
385
- ol {
386
- li {
387
- margin-left: 0;
388
- margin-right: spacing(5);
389
- padding-left: 0;
390
- padding-right: spacing(3);
391
- }
392
- }
393
-
394
- ul {
395
- li {
396
- margin-right: spacing(3);
397
-
398
- &::before {
399
- left: auto;
400
- right: px-to-rem(-12px);
401
- @include dataurlicon("listarrowreverse");
402
- }
403
- }
404
- }
405
-
406
363
  blockquote {
407
364
  background-position: -1px -1px;
408
365
  padding: spacing(14) spacing(8) spacing(9) 0;
409
- @include dataurlicon("trianglereverse", $color-ux-background-default);
366
+ @include cornercut(72px, 40px, "left");
410
367
 
411
368
  p {
412
369
  padding: 0 0 0 spacing(12);
@@ -426,6 +383,10 @@
426
383
 
427
384
  @include breakpoint("medium") {
428
385
  padding: spacing(15) spacing(12) spacing(12) 0;
386
+
387
+ blockquote {
388
+ @include cornercut(86px, 48px, "left");
389
+ }
429
390
  }
430
391
  }
431
392
  }
@@ -19,11 +19,11 @@
19
19
  @include cornercut(72px, 40px, left);
20
20
  }
21
21
 
22
- [class$="profile--contents--light"] * {
22
+ [class$="profile__theme__light"] * {
23
23
  color: $color-base-neutrals-dark;
24
24
  }
25
25
 
26
- [class$="profile--contents--dark"] * {
26
+ [class$="profile__theme__dark"] * {
27
27
  color: $color-base-neutrals-white;
28
28
  }
29
29
 
@@ -35,7 +35,7 @@
35
35
 
36
36
  border-color: $brand-ilo-blue;
37
37
 
38
- [class*="profile--contents"] * {
38
+ [class*="profile__theme"] * {
39
39
  color: $color-base-blue-medium;
40
40
  }
41
41
  }