@ilo-org/styles 1.3.3 → 1.3.4

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": "@ilo-org/styles",
3
3
  "description": "Styles for products using ILO's Design System",
4
- "version": "1.3.3",
4
+ "version": "1.3.4",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/international-labour-organization/designsystem.git",
@@ -39,8 +39,8 @@
39
39
  "license": "Apache-2.0",
40
40
  "dependencies": {
41
41
  "@ilo-org/themes": "0.9.1",
42
- "@ilo-org/fonts": "1.0.0",
43
- "@ilo-org/icons": "2.0.0"
42
+ "@ilo-org/icons": "2.0.0",
43
+ "@ilo-org/fonts": "1.0.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "cssnano": "^7.0.6",
package/scss/_mixins.scss CHANGED
@@ -395,65 +395,58 @@
395
395
  // and also lists in RichText.
396
396
  // ======================================
397
397
 
398
- @mixin invincible-list {
399
- // Ordered list shows numbers
398
+ @mixin invincible-list($bullet-color: rgba(184, 196, 204, 1)) {
399
+ li {
400
+ position: relative;
401
+ padding-inline-start: spacing(4);
402
+ margin-bottom: spacing(4);
403
+ font-family: var(--ilo-fonts-copy);
404
+ font-weight: var(--ilo-font-weight-regular);
405
+ font-size: var(--ilo-font-size-md);
406
+ line-height: var(--ilo-line-height-2xlg);
407
+
408
+ @include breakpoint("md") {
409
+ font-size: var(--ilo-font-size-lg);
410
+ }
411
+ }
412
+
413
+ // Ordered list styles
400
414
  ol {
401
415
  counter-reset: item;
402
416
 
403
417
  li {
404
418
  counter-increment: item;
405
419
  display: table;
406
- }
407
420
 
408
- li::before {
409
- content: counter(item) ".";
410
- display: table-cell;
411
- text-align: right;
412
- padding-inline-end: spacing(2);
421
+ &::before {
422
+ content: counter(item) ".";
423
+ display: table-cell;
424
+ text-align: right;
425
+ padding-inline-end: spacing(2);
426
+ }
413
427
  }
414
428
  }
415
429
 
416
- // Unordered list shows triangles
430
+ // Unordered list styles
417
431
  ul {
418
432
  li {
419
- position: relative;
420
- padding-inline-start: spacing(8);
433
+ display: table;
421
434
 
422
435
  &::before {
423
436
  content: "";
424
- position: absolute;
437
+ display: table-cell;
438
+ text-align: right;
439
+ padding-inline-end: spacing(2);
425
440
  height: px-to-rem(24px);
426
- width: px-to-rem(24px);
427
- top: spacing(1);
428
- @include dataurlicon("caret_right", $color-base-neutrals-light);
441
+ width: px-to-rem(26px);
429
442
  background-repeat: no-repeat;
443
+ @include dataurlicon("caret_right", $bullet-color);
430
444
 
431
- // Left takes precedence in LTR layouts
432
- // Right takes precents in RTL layouts
433
- left: 0;
434
- right: 0;
435
-
436
- // We have to rotate the bullet in RTL
445
+ // Adjust for RTL
437
446
  [dir="rtl"] & {
438
447
  transform: rotate(180deg);
439
448
  }
440
449
  }
441
450
  }
442
451
  }
443
-
444
- li {
445
- @include font-styles("body-small");
446
- font-family: var(--ilo-fonts-copy);
447
- margin-bottom: spacing(4);
448
-
449
- b,
450
- strong {
451
- font-weight: 700;
452
- letter-spacing: $type-label-small-letter-spacing;
453
- }
454
-
455
- @include breakpoint("md") {
456
- @include font-styles("base");
457
- }
458
- }
459
452
  }
@@ -43,17 +43,15 @@
43
43
  position: absolute;
44
44
  background-repeat: no-repeat;
45
45
  @include dataurlicon("chevron_right", $color-link-text-default);
46
- background-position: left;
47
46
  background-size: px-to-rem(24px);
48
47
  height: px-to-rem(24px);
49
48
  width: px-to-rem(24px);
50
- }
51
49
 
52
- [dir="rtl"] & {
53
- background-position: right;
54
- background-repeat: no-repeat;
55
- background-size: px-to-rem(24px);
56
- @include dataurlicon("chevron_left", $color-link-text-default);
50
+ [dir="rtl"] & {
51
+ left: auto;
52
+ right: 0;
53
+ @include dataurlicon("chevron_left", $color-link-text-default);
54
+ }
57
55
  }
58
56
  }
59
57
 
@@ -10,7 +10,7 @@
10
10
  &__factlist {
11
11
  --max-width: #{px-to-rem(375px)};
12
12
 
13
- border-bottom: px-to-rem(3px) solid $brand-ilo-grey-ui;
13
+ border-bottom: px-to-rem(3px) solid var(--ilo-color-gray-base);
14
14
  padding: spacing(10) spacing(6) spacing(12);
15
15
 
16
16
  @include cornercut(72px, 40px);
@@ -40,56 +40,33 @@
40
40
 
41
41
  &#{$self}__theme {
42
42
  &__dark {
43
- border-bottom: px-to-rem(3px) solid $color-base-red-medium;
44
-
45
- #{$self}--title {
46
- color: $brand-ilo-white;
47
- }
48
-
49
- .ilo--list__item {
50
- color: $brand-ilo-white;
43
+ border-bottom: px-to-rem(3px) solid var(--ilo-color-red);
51
44
 
45
+ .ilo--list--item {
52
46
  &:last-of-type {
53
47
  margin-bottom: 0;
54
48
  }
55
49
  }
56
50
 
57
- &:hover,
58
- &:focus,
59
- &:focus-within {
60
- #{$self}--title {
61
- color: $brand-ilo-white;
62
- }
51
+ color: var(--ilo-color-white);
63
52
 
64
- .ilo--list__item {
65
- color: $brand-ilo-white;
66
- }
53
+ #{$self}--title {
54
+ color: var(--ilo-color-white);
67
55
  }
68
56
  }
69
57
  }
70
58
 
71
59
  #{$self}--title {
72
60
  color: $brand-ilo-black;
73
- @include font-styles("headline-5");
74
- @include textmargin(
75
- "margin-bottom",
76
- 32px,
77
- "headline-5",
78
- "display",
79
- "body-small",
80
- "copy"
81
- );
82
-
83
- @include breakpoint("lg") {
84
- @include font-styles("headline-4");
85
- @include textmargin(
86
- "margin-bottom",
87
- 40px,
88
- "headline-4",
89
- "display",
90
- "base",
91
- "copy"
92
- );
61
+ font-size: var(--ilo-font-size-xlg);
62
+ line-height: var(--ilo-line-height-md);
63
+ letter-spacing: var(--ilo-letter-spacing-xsm);
64
+ font-weight: var(--ilo-font-weight-bold);
65
+ margin-bottom: spacing(4);
66
+
67
+ @include breakpoint("md") {
68
+ font-size: var(--ilo-font-size-3xlg);
69
+ margin-bottom: spacing(6);
93
70
  }
94
71
  }
95
72
  }
@@ -3,16 +3,28 @@
3
3
  @import "../mixins";
4
4
 
5
5
  .ilo--list {
6
- @include invincible-list;
7
-
8
6
  &--title {
9
- @include font-styles("headline-6");
10
- margin-bottom: spacing(6);
11
- font-family: var(--ilo-fonts-display);
12
- font-weight: 700;
7
+ font-size: var(--ilo-font-size-xlg);
8
+ line-height: var(--ilo-line-height-md);
9
+ letter-spacing: var(--ilo-letter-spacing-xsm);
10
+ font-weight: var(--ilo-font-weight-bold);
11
+ margin-bottom: spacing(4);
12
+
13
+ @include breakpoint("lg") {
14
+ font-size: var(--ilo-font-size-3xlg);
15
+ margin-bottom: spacing(6);
16
+ }
17
+ }
18
+
19
+ &__theme {
20
+ &__light {
21
+ color: var(--ilo-color-gray-charcoal);
22
+ @include invincible-list;
23
+ }
13
24
 
14
- @include breakpoint("md") {
15
- @include font-styles("headline-5");
25
+ &__dark {
26
+ color: var(--ilo-color-white);
27
+ @include invincible-list(rgba(255, 255, 255, 1));
16
28
  }
17
29
  }
18
30