@ilo-org/styles 1.3.3 → 1.4.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.
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.4.0",
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.1.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,56 @@
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: var(--ilo-color-gray-base)) {
399
+ li {
400
+ position: relative;
401
+ margin-bottom: spacing(4);
402
+ display: table;
403
+ border-collapse: separate;
404
+ border-spacing: spacing(3) 0;
405
+ margin-left: calc(spacing(3) * -1);
406
+ margin-right: calc(spacing(3) * -1);
407
+
408
+ font-family: var(--ilo-fonts-copy);
409
+ font-weight: var(--ilo-font-weight-regular);
410
+ font-size: var(--ilo-font-size-md);
411
+ line-height: var(--ilo-line-height-2xlg);
412
+
413
+ @include breakpoint("md") {
414
+ font-size: var(--ilo-font-size-lg);
415
+ }
416
+ }
417
+
418
+ // Ordered list styles
400
419
  ol {
401
420
  counter-reset: item;
402
421
 
403
422
  li {
404
423
  counter-increment: item;
405
- display: table;
406
- }
407
424
 
408
- li::before {
409
- content: counter(item) ".";
410
- display: table-cell;
411
- text-align: right;
412
- padding-inline-end: spacing(2);
425
+ &::before {
426
+ content: counter(item) ".";
427
+ display: table-cell;
428
+ text-align: right;
429
+ width: px-to-rem(26px);
430
+ }
413
431
  }
414
432
  }
415
433
 
416
- // Unordered list shows triangles
434
+ // Unordered list styles
417
435
  ul {
418
436
  li {
419
- position: relative;
420
- padding-inline-start: spacing(8);
421
-
422
437
  &::before {
423
438
  content: "";
424
- position: absolute;
425
- height: px-to-rem(24px);
426
- width: px-to-rem(24px);
427
- top: spacing(1);
428
- @include dataurlicon("caret_right", $color-base-neutrals-light);
429
- background-repeat: no-repeat;
430
-
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
439
+ display: table-cell;
440
+ width: px-to-rem(26px);
441
+ @include icon("caret_right", $bullet-color);
442
+
443
+ // Adjust for RTL
437
444
  [dir="rtl"] & {
438
445
  transform: rotate(180deg);
439
446
  }
440
447
  }
441
448
  }
442
449
  }
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
450
  }
@@ -1,110 +1,117 @@
1
1
  @use "../tokens" as *;
2
2
  @use "../functions" as *;
3
3
  @import "../mixins";
4
+ @import "../config";
4
5
 
5
6
  /**
6
- This mixin is used in _richtext.scss component to style blockquotes.
7
- It could eventually be used for a standalone blockquote component.
7
+ This mixin is also used in _richtext.scss component to style blockquotes.
8
8
  **/
9
9
  @mixin blockquote {
10
- blockquote {
11
- background-color: $color-ux-background-highlight;
12
- background-position: right top;
13
- background-repeat: no-repeat;
14
- background-size: px-to-rem(72px) px-to-rem(40px);
15
- display: block;
16
- font-family: var(--ilo-fonts-display);
17
- padding: spacing(19) 0 spacing(9) spacing(8); // check
10
+ background-color: var(--ilo-color-blue-lighter);
11
+ background-position: right top;
12
+ background-repeat: no-repeat;
13
+ background-size: px-to-rem(72px) px-to-rem(40px);
14
+ display: block;
15
+ font-family: var(--ilo-fonts-display);
16
+ padding: spacing(19) 0 spacing(9) spacing(8); // check
17
+ position: relative;
18
+ width: fit-content;
19
+ border-bottom: px-to-rem(3px) solid var(--ilo-color-gray-base);
20
+ @include cornercut(72px, 40px);
21
+
22
+ p {
23
+ color: var(--ilo-color-purple);
24
+ font-weight: 300;
25
+ padding: 0 spacing(12) 0 0;
18
26
  position: relative;
19
- width: fit-content;
20
- @include cornercut(72px, 40px);
27
+ @include font-styles("pull-quote-sm");
28
+
29
+ &:after {
30
+ bottom: 0;
31
+ content: "";
32
+ display: inline-block;
33
+ height: px-to-rem(20px);
34
+ position: absolute;
35
+ right: 0;
36
+ transform: scaleX(-1);
37
+ width: px-to-rem(26.5px);
38
+ @include icon("quote", var(--ilo-color-purple));
39
+ }
40
+ }
41
+
42
+ cite {
43
+ color: var(--ilo-color-gray-accessible);
44
+ font-weight: 400;
45
+ // @include font-styles("pull-quote-cite");
46
+ font-size: var(--ilo-font-size-sm);
47
+ line-height: 135%;
48
+ letter-spacing: 0;
49
+ font-style: normal;
50
+ }
51
+
52
+ &:before {
53
+ content: "";
54
+ display: inline-block;
55
+ height: px-to-rem(40px);
56
+ left: 0;
57
+ position: absolute;
58
+ width: px-to-rem(53px);
59
+ top: 0;
60
+ @include icon("quote", var(--ilo-color-purple));
61
+ }
62
+
63
+ @include breakpoint("md") {
64
+ background-size: px-to-rem(86px) px-to-rem(48px);
65
+ padding: spacing(16) 0 spacing(12) spacing(12);
66
+ @include cornercut(86px, 48px);
21
67
 
22
68
  p {
23
- color: $color-font-blockquote;
24
- font-weight: 300;
69
+ margin-bottom: spacing(6);
25
70
  padding: 0 spacing(12) 0 0;
26
71
  position: relative;
27
- @include font-styles("pull-quote-sm");
72
+ @include font-styles("pull-quote-lg");
28
73
 
29
74
  &:after {
30
- bottom: 0;
31
- content: "";
32
- display: inline-block;
33
- height: px-to-rem(20px);
34
- position: absolute;
35
- right: 0;
36
- transform: scaleX(-1);
37
- width: px-to-rem(26.5px);
38
- @include icon("quote", var(--ilo-color-purple));
75
+ height: px-to-rem(24px);
76
+ width: px-to-rem(32px);
39
77
  }
40
78
  }
41
79
 
42
- cite {
43
- color: $color-font-cite;
44
- font-weight: 400;
45
- @include font-styles("pull-quote-cite");
46
- }
47
-
48
80
  &:before {
49
- content: "";
50
- display: inline-block;
51
- height: px-to-rem(40px);
52
- left: 0;
53
- position: absolute;
54
- width: px-to-rem(53px);
55
- top: 0;
56
- @include icon("quote", var(--ilo-color-purple));
57
- }
58
-
59
- @include breakpoint("md") {
60
- background-size: px-to-rem(86px) px-to-rem(48px);
61
- padding: spacing(16) 0 spacing(12) spacing(12);
62
- @include cornercut(86px, 48px);
63
-
64
- p {
65
- margin-bottom: spacing(6);
66
- padding: 0 spacing(12) 0 0;
67
- position: relative;
68
- @include font-styles("pull-quote-lg");
69
-
70
- &:after {
71
- height: px-to-rem(24px);
72
- width: px-to-rem(32px);
73
- }
74
- }
75
-
76
- &:before {
77
- height: px-to-rem(48px);
78
- width: px-to-rem(64px);
79
- }
81
+ height: px-to-rem(48px);
82
+ width: px-to-rem(64px);
80
83
  }
84
+ }
81
85
 
82
- [dir="rtl"] & {
83
- background-position: -1px -1px;
84
- padding: spacing(14) spacing(8) spacing(9) 0;
85
- @include cornercut(72px, 40px, "left");
86
+ [dir="rtl"] & {
87
+ background-position: -1px -1px;
88
+ padding: spacing(14) spacing(8) spacing(9) 0;
89
+ @include cornercut(72px, 40px, "left");
86
90
 
87
- p {
88
- padding: 0 0 0 spacing(12);
91
+ p {
92
+ padding: 0 0 0 spacing(12);
89
93
 
90
- &:after {
91
- left: 0;
92
- right: auto;
93
- transform: scaleX(1);
94
- }
94
+ &:after {
95
+ left: 0;
96
+ right: auto;
97
+ transform: scaleX(1);
95
98
  }
99
+ }
96
100
 
97
- &:before {
98
- left: auto;
99
- right: 0;
100
- transform: scaleX(-1);
101
- }
101
+ &:before {
102
+ left: auto;
103
+ right: 0;
104
+ transform: scaleX(-1);
105
+ }
102
106
 
103
- @include breakpoint("md") {
104
- padding: spacing(15) spacing(12) spacing(12) 0;
107
+ @include breakpoint("md") {
108
+ padding: spacing(15) spacing(12) spacing(12) 0;
105
109
 
106
- @include cornercut(86px, 48px, "left");
107
- }
110
+ @include cornercut(86px, 48px, "left");
108
111
  }
109
112
  }
110
113
  }
114
+
115
+ .ilo--blockquote {
116
+ @include blockquote;
117
+ }
@@ -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
 
@@ -8,12 +8,16 @@
8
8
  $transition-timing: 250ms;
9
9
  box-sizing: border-box;
10
10
  position: relative;
11
- background-color: map-get($color, "base", "neutrals", "white");
11
+ background-color: var(--ilo-color-white);
12
12
 
13
13
  // Max width is set in the invididual card types unless fluid
14
14
  max-width: var(--max-width);
15
15
  flex: 1 1 var(--max-width);
16
16
 
17
+ * {
18
+ @include globaltransition("color, background-color, border-color, opacity");
19
+ }
20
+
17
21
  &__size__fluid {
18
22
  --max-width: 100% !important;
19
23
  }
@@ -21,50 +25,51 @@
21
25
  &__action:hover,
22
26
  &__action:focus,
23
27
  &__action:focus-within {
24
- background: $brand-ilo-white;
28
+ // background: var(--ilo-color-white);
25
29
  outline: none;
26
30
  text-decoration: none;
27
31
 
28
- &#{$self}__dark {
29
- background: $brand-ilo-white;
30
- }
32
+ // &#{$self}__dark {
33
+ // background: var(--ilo-color-white);
34
+ // }
31
35
 
32
36
  #{$self}--eyebrow,
33
37
  #{$self}--title,
34
38
  #{$self}--intro,
35
39
  #{$self}--date,
36
40
  #{$self}--date-extra {
37
- color: $brand-ilo-blue;
41
+ color: var(--ilo-color-blue);
38
42
  }
39
43
  }
40
44
 
41
45
  &__theme {
42
46
  &__light {
43
- background: $brand-ilo-white;
47
+ background: var(--ilo-color-white);
44
48
  }
45
49
 
46
50
  &__dark {
47
- background: $brand-ilo-dark-blue;
48
- transition: background $transition-timing ease-out;
51
+ background: var(--ilo-color-blue-dark);
49
52
 
50
53
  #{$self}--eyebrow,
51
54
  #{$self}--title,
52
55
  #{$self}--intro,
53
56
  #{$self}--date,
54
57
  #{$self}--eventdate {
55
- color: $brand-ilo-grey-light;
56
- transition: color $transition-timing ease-out;
58
+ color: var(--ilo-color-gray-light);
57
59
  }
58
60
  }
61
+
62
+ &__soft {
63
+ background: var(--ilo-color-blue-lighter);
64
+ }
59
65
  }
60
66
 
61
67
  &__isvideo {
62
68
  #{$self}--image--wrapper {
63
69
  position: relative;
64
70
 
65
- &::before {
66
- @include dataurlicon("play", $brand-ilo-grey-light);
67
- background-color: $brand-ilo-black;
71
+ &::before,
72
+ &::after {
68
73
  background-position: center;
69
74
  background-size: 18px 20px;
70
75
  background-repeat: no-repeat;
@@ -77,6 +82,14 @@
77
82
  width: 40px;
78
83
  z-index: 1;
79
84
  }
85
+
86
+ &::before {
87
+ background-color: var(--ilo-color-gray-charcoal);
88
+ }
89
+
90
+ &::after {
91
+ @include icon("caret_right", var(--ilo-color-gray-light));
92
+ }
80
93
  }
81
94
  }
82
95
 
@@ -105,35 +118,31 @@
105
118
  top: 0;
106
119
  width: 100%;
107
120
  z-index: 2;
108
- @include globaltransition("color, background-color, border-color, opacity");
109
121
 
110
122
  &:hover,
111
123
  &:focus,
112
124
  &:focus-within {
113
125
  outline: none;
114
- @include globaltransition(
115
- "color, background-color, border-color, opacity"
116
- );
117
126
 
118
127
  + #{$self}--wrap {
119
128
  #{$self}--eyebrow {
120
- color: $brand-ilo-blue;
129
+ color: var(--ilo-color-blue);
121
130
  }
122
131
 
123
132
  #{$self}--title {
124
- color: $brand-ilo-blue;
133
+ color: var(--ilo-color-blue);
125
134
  }
126
135
 
127
136
  #{$self}--intro {
128
- color: $brand-ilo-blue;
137
+ color: var(--ilo-color-blue);
129
138
  }
130
139
 
131
140
  #{$self}--date {
132
- color: $brand-ilo-blue;
141
+ color: var(--ilo-color-blue);
133
142
  }
134
143
 
135
144
  #{$self}--eventdate {
136
- color: $brand-ilo-blue;
145
+ color: var(--ilo-color-blue);
137
146
  }
138
147
  }
139
148
  }
@@ -147,18 +156,16 @@
147
156
  color: $brand-ilo-purple;
148
157
  @include font-styles("body-small");
149
158
  margin-bottom: spacing(3);
150
- @include globaltransition("color");
151
159
 
152
160
  #{$self}--link:hover &,
153
161
  #{$self}--link:focus &,
154
162
  #{$self}--link:focus-within & {
155
- color: $brand-ilo-blue;
156
- @include globaltransition("color");
163
+ color: var(--ilo-color-blue);
157
164
  }
158
165
  }
159
166
 
160
167
  &--title {
161
- color: $brand-ilo-dark-blue;
168
+ color: var(--ilo-color-blue-dark);
162
169
  font-family: var(--ilo-fonts-display);
163
170
  font-weight: 700;
164
171
  @include font-styles("headline-5");
@@ -170,27 +177,23 @@
170
177
  "body-small",
171
178
  "copy"
172
179
  );
173
- @include globaltransition("color");
174
180
 
175
181
  #{$self}--link:hover &,
176
182
  #{$self}--link:focus &,
177
183
  #{$self}--link:focus-within & {
178
- color: $brand-ilo-blue;
179
- @include globaltransition("color");
184
+ color: var(--ilo-color-blue);
180
185
  }
181
186
  }
182
187
 
183
188
  &--intro {
184
- color: $brand-ilo-black;
189
+ color: var(--ilo-color-gray-charcoal);
185
190
  @include font-styles("body-small");
186
- @include globaltransition("color");
187
191
  margin-bottom: spacing(8);
188
192
 
189
193
  #{$self}--link:hover &,
190
194
  #{$self}--link:focus &,
191
195
  #{$self}--link:focus-within & {
192
- color: $brand-ilo-blue;
193
- @include globaltransition("color");
196
+ color: var(--ilo-color-blue);
194
197
  }
195
198
  }
196
199
 
@@ -198,13 +201,11 @@
198
201
  color: $brand-ilo-grey-accessible;
199
202
  @include font-styles("body-small");
200
203
  @include textmargin("margin-bottom", 30px, "body-small", "copy", 0, 0);
201
- @include globaltransition("color");
202
204
 
203
205
  #{$self}--link:hover &,
204
206
  #{$self}--link:focus &,
205
207
  #{$self}--link:focus-within & {
206
- color: $brand-ilo-blue;
207
- @include globaltransition("color");
208
+ color: var(--ilo-color-blue);
208
209
  }
209
210
  }
210
211
 
@@ -18,6 +18,17 @@
18
18
  position: relative;
19
19
  width: 100%;
20
20
 
21
+ &--content {
22
+ &-links-list {
23
+ display: flex;
24
+ flex-wrap: wrap;
25
+ }
26
+
27
+ &-link.ilo--link {
28
+ margin-bottom: 0px !important;
29
+ }
30
+ }
31
+
21
32
  #{$self}--content {
22
33
  display: grid;
23
34
  grid-template-columns: 1fr;
@@ -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
  }