@ilo-org/styles 1.14.1 → 1.14.3

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.14.1",
4
+ "version": "1.14.3",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/international-labour-organization/designsystem.git",
@@ -37,8 +37,8 @@
37
37
  },
38
38
  "license": "Apache-2.0",
39
39
  "dependencies": {
40
- "@ilo-org/fonts": "2.0.0",
41
- "@ilo-org/icons": "2.4.1"
40
+ "@ilo-org/fonts": "2.0.1",
41
+ "@ilo-org/icons": "2.4.2"
42
42
  },
43
43
  "devDependencies": {
44
44
  "cssnano": "^7.0.6",
@@ -38,6 +38,11 @@
38
38
  padding-block-end: spacing(3);
39
39
  }
40
40
  &--track-name {
41
+ // `display: block` is required for the ellipsis to apply: when `nameHref`
42
+ // is set the name renders as an inline `<a>`, and text-overflow/overflow
43
+ // are no-ops on inline elements, so long linked titles would overflow
44
+ // instead of truncating.
45
+ display: block;
41
46
  font-size: var(--ilo-font-size-sm);
42
47
  font-weight: var(--ilo-font-weight-medium);
43
48
  line-height: var(--ilo-line-height-lg);
@@ -46,7 +51,14 @@
46
51
  white-space: nowrap;
47
52
  }
48
53
  &--track-details {
49
- display: flex;
54
+ // Block (not flex) so the combined "programme • creator" line truncates
55
+ // with an ellipsis when it overflows; text-overflow is a no-op on a flex
56
+ // container. The child spans stay inline, so the bullet separator and
57
+ // spacing are unchanged.
58
+ display: block;
59
+ overflow: hidden;
60
+ text-overflow: ellipsis;
61
+ white-space: nowrap;
50
62
  font-size: var(--ilo-font-size-xsm);
51
63
  line-height: var(--ilo-line-height-xlg);
52
64
  color: var(--ilo-color-gray-light);
@@ -189,21 +201,34 @@
189
201
 
190
202
  @include breakpoint("md") {
191
203
  &--body {
192
- grid-template-columns: 1fr 1fr 1fr;
204
+ // The center column hugs its content while the equal minmax(0, 1fr) side
205
+ // tracks keep it optically centered. minmax(0, 1fr) (not plain 1fr, which
206
+ // has an implicit min-content floor) lets the side tracks shrink below
207
+ // their content so the title/authors can truncate instead of pushing the
208
+ // center off-axis.
209
+ grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
193
210
  grid-template-rows: auto;
194
211
  grid-template-areas: "left center right";
195
212
  }
196
213
  &--left {
197
214
  border-bottom: none;
198
- padding-inline: spacing(3) 0;
199
215
  padding-block: 0;
200
- }
201
- &--track-name {
202
- width: 30vw;
216
+ // Trailing gap separating the title/authors from the centered controls.
217
+ // The 5vw term scales with the viewport — tighter when narrow, roomier
218
+ // when wide. vw (not %, which resolves against this item's own narrow grid
219
+ // track and so never reaches the bounds) ties the gap to viewport width so
220
+ // the clamp's floor (narrow `md`) and ceiling (ultra-wide) actually engage.
221
+ padding-inline: spacing(3) clamp(spacing(3), 4vw, spacing(11));
222
+ // Allow the column to shrink below its content's intrinsic width so the
223
+ // title/authors can truncate.
224
+ min-width: 0;
203
225
  }
204
226
  &--center {
205
227
  justify-content: center;
206
- padding: 0;
228
+ // Horizontal padding gives the play controls breathing room from the
229
+ // title (left) and time/volume cluster (right). The center track is
230
+ // auto-sized, so this widens the gap on both sides while staying centered.
231
+ padding-block: 0;
207
232
  }
208
233
  &--volume-slider {
209
234
  width: 40%;