@ilo-org/styles 1.0.0 → 1.0.2

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.0.0",
4
+ "version": "1.0.2",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/international-labour-organization/designsystem.git",
@@ -38,7 +38,7 @@
38
38
  "author": "@justintemps, @johnpauldavis, @avrilpearl, @ghlost",
39
39
  "license": "Apache-2.0",
40
40
  "dependencies": {
41
- "@ilo-org/fonts": "0.2.1",
41
+ "@ilo-org/fonts": "0.2.2",
42
42
  "@ilo-org/icons": "0.3.1",
43
43
  "@ilo-org/themes": "0.8.1"
44
44
  },
package/scss/_mixins.scss CHANGED
@@ -373,10 +373,10 @@
373
373
  background: map-get($color, "tooltip", "dark", "background");
374
374
  height: $height;
375
375
  width: $width;
376
-
377
376
  display: flex;
378
377
  justify-content: center;
379
378
  align-items: center;
379
+ position: relative;
380
380
 
381
381
  &::after {
382
382
  content: "";
@@ -16,7 +16,7 @@
16
16
  width: 100%;
17
17
  margin: 0;
18
18
  padding: spacing(4) 0;
19
- padding-inline-end: spacing(4);
19
+ padding-inline-end: spacing(11);
20
20
 
21
21
  background-color: $color-ux-background-default;
22
22
  background-position: calc(100% - px-to-rem(6px)) center;
@@ -38,7 +38,7 @@
38
38
  &--large {
39
39
  @include font-styles("headline-6");
40
40
  padding: spacing(5) 0;
41
- padding-inline-end: spacing(4);
41
+ padding-inline-end: spacing(11);
42
42
  }
43
43
 
44
44
  &:hover,
@@ -64,7 +64,7 @@
64
64
  &--large {
65
65
  @include font-styles("headline-6");
66
66
  padding: spacing(5) 0;
67
- padding-inline-end: spacing(4);
67
+ padding-inline-end: spacing(11);
68
68
  }
69
69
  }
70
70
 
@@ -51,6 +51,7 @@
51
51
 
52
52
  &--dropdown {
53
53
  font-family: $fonts-copy;
54
+ @include font-styles("body-xxs");
54
55
  }
55
56
  }
56
57
 
@@ -84,6 +84,17 @@
84
84
  }
85
85
  }
86
86
 
87
+ &--breadcrumbs {
88
+ grid-area: 1 / 1 / 2 / 5;
89
+ z-index: 1;
90
+ display: flex;
91
+ flex-flow: row nowrap;
92
+
93
+ &--wrapper {
94
+ width: 100%;
95
+ }
96
+ }
97
+
87
98
  &--card {
88
99
  grid-area: 3 / 1 / 5 / 2;
89
100
  }
@@ -100,262 +111,254 @@
100
111
  }
101
112
  }
102
113
 
103
- --card-width: 625px;
104
- --corner-cut-height: #{$spacing-hero-card-corner-cut-height-lg};
105
- --breadcrumbs-height: 48px;
106
- --image-gap: 240px;
107
-
108
- // Defaults to baseline
109
- --row-1-lg: var(--breadcrumbs-height);
110
- --row-2-lg: calc(var(--image-gap) - var(--breadcrumbs-height));
111
- --row-3-lg: auto;
112
- --row-4-lg: #{$spacing-hero-tooltip-height};
113
- --row-5-lg: 72px;
114
-
115
- --col-1-lg: 0;
116
- --col-2-lg: var(--card-width);
117
- --col-3-lg: #{$spacing-hero-tooltip-width};
118
- --col-4-lg: 1fr;
119
-
120
- grid-template-rows:
121
- var(--row-1-lg)
122
- var(--row-2-lg)
123
- var(--row-3-lg)
124
- var(--row-4-lg);
125
-
126
- grid-template-columns:
127
- var(--col-1-lg)
128
- var(--col-2-lg)
129
- var(--col-3-lg)
130
- var(--col-4-lg);
131
-
132
- &__poster-size {
133
- &__small {
134
- --image-gap: 112px;
135
- }
136
-
137
- &__medium {
138
- --image-gap: 176px;
139
- }
114
+ @include breakpoint("large") {
115
+ --card-width: 625px;
116
+ --corner-cut-height: #{$spacing-hero-card-corner-cut-height-lg};
117
+ --breadcrumbs-height: 48px;
118
+ --image-gap: 240px;
119
+
120
+ // Defaults to baseline
121
+ --row-1-lg: var(--breadcrumbs-height);
122
+ --row-2-lg: calc(var(--image-gap) - var(--breadcrumbs-height));
123
+ --row-3-lg: auto;
124
+ --row-4-lg: #{$spacing-hero-tooltip-height};
125
+ --row-5-lg: 72px;
126
+
127
+ --col-1-lg: 0;
128
+ --col-2-lg: var(--card-width);
129
+ --col-3-lg: #{$spacing-hero-tooltip-width};
130
+ --col-4-lg: 1fr;
131
+
132
+ grid-template-rows:
133
+ var(--row-1-lg)
134
+ var(--row-2-lg)
135
+ var(--row-3-lg)
136
+ var(--row-4-lg);
137
+
138
+ grid-template-columns:
139
+ var(--col-1-lg)
140
+ var(--col-2-lg)
141
+ var(--col-3-lg)
142
+ var(--col-4-lg);
143
+
144
+ &__poster-size {
145
+ &__small {
146
+ --image-gap: 112px;
147
+ }
140
148
 
141
- &__large {
142
- --image-gap: 240px;
143
- }
149
+ &__medium {
150
+ --image-gap: 176px;
151
+ }
144
152
 
145
- &__xlarge {
146
- --image-gap: 527px;
147
- }
148
- }
153
+ &__large {
154
+ --image-gap: 240px;
155
+ }
149
156
 
150
- &__card-size {
151
- &__small {
152
- --card-width: 625px;
157
+ &__xlarge {
158
+ --image-gap: 527px;
159
+ }
153
160
  }
154
161
 
155
- &__medium {
156
- --card-width: 721px;
157
- }
162
+ &__card-size {
163
+ &__small {
164
+ --card-width: 625px;
165
+ }
158
166
 
159
- &__large {
160
- --card-width: 856px;
161
- }
167
+ &__medium {
168
+ --card-width: 721px;
169
+ }
162
170
 
163
- &__xlarge {
164
- --card-width: 920px;
165
- }
171
+ &__large {
172
+ --card-width: 856px;
173
+ }
166
174
 
167
- &__xxlarge {
168
- --card-width: 998px;
169
- }
170
- }
175
+ &__xlarge {
176
+ --card-width: 920px;
177
+ }
171
178
 
172
- &__card-justify {
173
- &__start,
174
- &__offset {
175
- --card-padding-start: #{$squeezy-padding-start};
176
- --col-1-lg: #{$card-offset};
179
+ &__xxlarge {
180
+ --card-width: 998px;
181
+ }
177
182
  }
178
183
 
179
- &__offset {
180
- --added-offset: 109px;
181
- }
184
+ &__card-justify {
185
+ &__start,
186
+ &__offset {
187
+ --card-padding-start: #{$squeezy-padding-start};
188
+ --col-1-lg: #{$card-offset};
189
+ }
182
190
 
183
- &__center {
184
- --col-1-lg: calc((100% - var(--card-width)) / 2);
185
- --col-4-lg: calc(
186
- ((100% - var(--card-width)) / 2) - #{$spacing-hero-tooltip-width}
187
- );
188
- }
189
- }
191
+ &__offset {
192
+ --added-offset: 109px;
193
+ }
190
194
 
191
- &__card-align {
192
- &__center {
193
- --row-4-lg: calc(72px - #{$spacing-hero-tooltip-height});
194
- --row-5-lg: #{$spacing-hero-tooltip-height};
195
+ &__center {
196
+ --col-1-lg: calc((100% - var(--card-width)) / 2);
197
+ --col-4-lg: calc(
198
+ ((100% - var(--card-width)) / 2) - #{$spacing-hero-tooltip-width}
199
+ );
200
+ }
195
201
  }
196
202
 
197
- &__bottom {
198
- --row-3-lg: 0;
199
- --row-4-lg: var(--corner-cut-height);
200
- --row-5-lg: auto;
201
- }
202
- }
203
+ &__card-align {
204
+ &__center {
205
+ --row-4-lg: calc(72px - #{$spacing-hero-tooltip-height});
206
+ --row-5-lg: #{$spacing-hero-tooltip-height};
207
+ }
203
208
 
204
- &__card-background {
205
- &__transparent {
206
- #{$c}--card-offset {
207
- background-color: transparent !important;
209
+ &__bottom {
210
+ --row-3-lg: 0;
211
+ --row-4-lg: var(--corner-cut-height);
212
+ --row-5-lg: auto;
208
213
  }
209
214
  }
210
- }
211
215
 
212
- &__card-theme {
213
- &__dark {
214
- #{$c}--card-offset {
215
- background-color: map-get($color, "base", "blue", "dark");
216
- position: relative;
217
- box-shadow: 0.3px 0 0 0 map-get($color, "base", "blue", "dark");
216
+ &__card-background {
217
+ &__transparent {
218
+ #{$c}--card-offset {
219
+ background-color: transparent !important;
220
+ box-shadow: none !important;
221
+ }
218
222
  }
223
+ }
219
224
 
220
- &[class*="semi-transparent"] {
225
+ &__card-theme {
226
+ &__dark {
221
227
  #{$c}--card-offset {
222
- background: rgba(
223
- map-get($color, "hero", "card", "dark", "background"),
224
- $opacity-semi-transparent
225
- );
226
- box-shadow: 0.3px 0 0 0
227
- rgba(
228
+ background-color: map-get($color, "base", "blue", "dark");
229
+ position: relative;
230
+ box-shadow: 0.3px 0 0 0 map-get($color, "base", "blue", "dark");
231
+ }
232
+
233
+ &[class*="semi-transparent"] {
234
+ #{$c}--card-offset {
235
+ background: rgba(
228
236
  map-get($color, "hero", "card", "dark", "background"),
229
237
  $opacity-semi-transparent
230
238
  );
239
+ box-shadow: 0.3px 0 0 0
240
+ rgba(
241
+ map-get($color, "hero", "card", "dark", "background"),
242
+ $opacity-semi-transparent
243
+ );
244
+ }
231
245
  }
232
246
  }
233
- }
234
-
235
- &__light {
236
- #{$c}--card-offset {
237
- background: map-get($color, "hero", "card", "light", "background");
238
- box-shadow: 0.3px 0 0 0
239
- map-get($color, "hero", "card", "light", "background");
240
- }
241
247
 
242
- &[class*="semi-transparent"] {
248
+ &__light {
243
249
  #{$c}--card-offset {
244
- background: rgba(
245
- map-get($color, "hero", "card", "light", "background"),
246
- $opacity-semi-transparent
247
- );
250
+ background: map-get($color, "hero", "card", "light", "background");
248
251
  box-shadow: 0.3px 0 0 0
249
- rgba(
252
+ map-get($color, "hero", "card", "light", "background");
253
+ }
254
+
255
+ &[class*="semi-transparent"] {
256
+ #{$c}--card-offset {
257
+ background: rgba(
250
258
  map-get($color, "hero", "card", "light", "background"),
251
259
  $opacity-semi-transparent
252
260
  );
261
+ box-shadow: 0.3px 0 0 0
262
+ rgba(
263
+ map-get($color, "hero", "card", "light", "background"),
264
+ $opacity-semi-transparent
265
+ );
266
+ }
253
267
  }
254
268
  }
255
269
  }
256
- }
257
-
258
- &--breadcrumbs {
259
- grid-area: 1 / 1 / 2 / 5;
260
- z-index: 1;
261
- display: flex;
262
- flex-flow: row nowrap;
263
-
264
- &--wrapper {
265
- width: 100%;
266
- }
267
- }
268
270
 
269
- &--background {
270
- grid-area: 1 / 1 / 5 / 5;
271
+ &--background {
272
+ grid-area: 1 / 1 / 5 / 5;
271
273
 
272
- #{$c}__card-align__center & {
273
- grid-area: 1 / 1 / 6 / 5;
274
- }
274
+ #{$c}__card-align__center & {
275
+ grid-area: 1 / 1 / 6 / 5;
276
+ }
275
277
 
276
- #{$c}__card-align__bottom & {
277
- grid-area: 1 / 1 / 5 / 5;
278
+ #{$c}__card-align__bottom & {
279
+ grid-area: 1 / 1 / 5 / 5;
280
+ }
278
281
  }
279
- }
280
282
 
281
- &--card-offset {
282
- grid-area: 3 / 1 / 6 / 2;
283
- z-index: 0;
284
- position: relative;
283
+ &--card-offset {
284
+ grid-area: 3 / 1 / 6 / 2;
285
+ z-index: 0;
286
+ position: relative;
285
287
 
286
- #{$c}__card-justify__offset &,
287
- #{$c}__card-justify__center & {
288
- background: transparent !important;
289
- }
288
+ #{$c}__card-justify__offset &,
289
+ #{$c}__card-justify__center & {
290
+ background: transparent !important;
291
+ }
290
292
 
291
- #{$c}__card-align__center & {
292
- grid-area: 3 / 1 / 4 / 2;
293
- }
293
+ #{$c}__card-align__center & {
294
+ grid-area: 3 / 1 / 4 / 2;
295
+ }
294
296
 
295
- #{$c}__card-align__bottom & {
296
- grid-area: 4 / 1 / 6 / 2;
297
+ #{$c}__card-align__bottom & {
298
+ grid-area: 4 / 1 / 6 / 2;
299
+ }
297
300
  }
298
- }
299
301
 
300
- &--card {
301
- grid-area: 3 / 2 / 6 / 3;
302
+ &--card {
303
+ grid-area: 3 / 2 / 6 / 3;
302
304
 
303
- #{$c}__card-align__center & {
304
- grid-area: 3 / 2 / 4 / 3;
305
- }
305
+ #{$c}__card-align__center & {
306
+ grid-area: 3 / 2 / 4 / 3;
307
+ }
306
308
 
307
- #{$c}__card-align__bottom & {
308
- grid-area: 4 / 2 / 6 / 3;
309
+ #{$c}__card-align__bottom & {
310
+ grid-area: 4 / 2 / 6 / 3;
311
+ }
309
312
  }
310
- }
311
313
 
312
- &--caption {
313
- grid-area: 4 / 3 / 5 / 4;
314
- position: relative;
314
+ &--caption {
315
+ grid-area: 4 / 3 / 5 / 4;
316
+ position: relative;
315
317
 
316
- #{$c}__card-align__center & {
317
- grid-area: 5 / 1 / 6 / 3;
318
- }
318
+ #{$c}__card-align__center & {
319
+ grid-area: 5 / 1 / 6 / 3;
320
+ }
319
321
 
320
- #{$c}__card-align__bottom & {
321
- grid-area: 4 / 1 / 5 / 2;
322
- }
322
+ #{$c}__card-align__bottom & {
323
+ grid-area: 4 / 1 / 5 / 2;
324
+ }
323
325
 
324
- #{$c}__card-align__center &,
325
- #{$c}__card-align__bottom & {
326
- &--wrapper {
327
- position: absolute;
328
- left: 0;
329
- bottom: 0;
326
+ #{$c}__card-align__center &,
327
+ #{$c}__card-align__bottom & {
328
+ &--wrapper {
329
+ position: absolute;
330
+ left: 0;
331
+ bottom: 0;
332
+ }
330
333
  }
331
- }
332
334
 
333
- #{$c}__card-align__bottom#{$c}__card-justify__start & {
334
- grid-area: 1 / 1 / 3 / 3;
335
- }
335
+ #{$c}__card-align__bottom#{$c}__card-justify__start & {
336
+ grid-area: 1 / 1 / 3 / 3;
337
+ }
336
338
 
337
- #{$c}__card-align__bottom#{$c}__card-justify__offset & {
338
- grid-area: 1 / 2 / 3 / 3;
339
- }
339
+ #{$c}__card-align__bottom#{$c}__card-justify__offset & {
340
+ grid-area: 1 / 2 / 3 / 3;
341
+ }
340
342
 
341
- #{$c}__card-align__bottom#{$c}__card-justify__start &,
342
- #{$c}__card-align__bottom#{$c}__card-justify__offset & {
343
- #{$c}--caption--wrapper {
344
- @include caption-icon-wrapper(
345
- "right",
346
- $spacing-hero-tooltip-width,
347
- $spacing-hero-tooltip-height
348
- );
343
+ #{$c}__card-align__bottom#{$c}__card-justify__start &,
344
+ #{$c}__card-align__bottom#{$c}__card-justify__offset & {
345
+ #{$c}--caption--wrapper {
346
+ @include caption-icon-wrapper(
347
+ "right",
348
+ $spacing-hero-tooltip-width,
349
+ $spacing-hero-tooltip-height
350
+ );
349
351
 
350
- position: absolute;
351
- left: 0;
352
- right: initial;
353
- bottom: 0;
352
+ position: absolute;
353
+ left: 0;
354
+ right: initial;
355
+ bottom: 0;
356
+ }
354
357
  }
355
- }
356
358
 
357
- &--wrapper {
358
- left: 2px;
359
+ &--wrapper {
360
+ left: 2px;
361
+ }
359
362
  }
360
363
  }
361
364
 
@@ -372,20 +375,22 @@
372
375
  }
373
376
  }
374
377
 
375
- &__card-align__bottom {
376
- &#{$c}__card-justify__start,
377
- &#{$c}__card-justify__offset {
378
- #{$c}--caption--wrapper {
379
- @include caption-icon-wrapper(
380
- "left",
381
- $spacing-hero-tooltip-width,
382
- $spacing-hero-tooltip-height
383
- );
378
+ @include breakpoint("large") {
379
+ &__card-align__bottom {
380
+ &#{$c}__card-justify__start,
381
+ &#{$c}__card-justify__offset {
382
+ #{$c}--caption--wrapper {
383
+ @include caption-icon-wrapper(
384
+ "left",
385
+ $spacing-hero-tooltip-width,
386
+ $spacing-hero-tooltip-height
387
+ );
384
388
 
385
- position: absolute;
386
- left: initial;
387
- right: 0;
388
- bottom: 0;
389
+ position: absolute;
390
+ left: initial;
391
+ right: 0;
392
+ bottom: 0;
393
+ }
389
394
  }
390
395
  }
391
396
  }
@@ -595,7 +595,7 @@
595
595
 
596
596
  &::before {
597
597
  background: $brand-ilo-dark-blue;
598
- clip-path: polygon(0 0, 100% 0, 100% 100%);
598
+ clip-path: polygon(0 0, 100% 0, 97% 100%);
599
599
  content: "";
600
600
  display: block;
601
601
  height: 100%;
@@ -605,7 +605,7 @@
605
605
  width: 32px;
606
606
 
607
607
  [dir="rtl"] & {
608
- clip-path: polygon(0 0, 0 100%, 100% 0);
608
+ clip-path: polygon(0 0, 0 100%, 97% 0);
609
609
  left: auto;
610
610
  right: -31px;
611
611
  }
@@ -71,6 +71,7 @@
71
71
  font-family: $fonts-display;
72
72
  font-weight: 600;
73
73
  display: flex;
74
+ gap: spacing(1);
74
75
  height: px-to-rem(60px);
75
76
  justify-content: flex-start;
76
77
  padding-left: spacing(2);
@@ -88,13 +89,13 @@
88
89
  &.icon {
89
90
  .ilo--icon {
90
91
  height: px-to-rem(16px);
91
- margin-right: px-to-rem(5px);
92
92
  order: 1;
93
93
  width: px-to-rem(16px);
94
94
  }
95
95
 
96
96
  .ilo--tabs--selection--label {
97
97
  order: 2;
98
+ flex: 1 1;
98
99
  }
99
100
  }
100
101
 
@@ -115,14 +116,14 @@
115
116
  }
116
117
 
117
118
  &--label {
118
- max-width: 50ch;
119
119
  overflow: hidden;
120
- text-overflow: ellipsis;
121
- white-space: nowrap;
122
120
  padding-top: spacing(1);
121
+ white-space: nowrap;
122
+ text-overflow: ellipsis;
123
123
  }
124
124
 
125
125
  &--item {
126
+ overflow: hidden;
126
127
  display: block;
127
128
  width: 100%;
128
129