@sc-360-v2/storefront-cms-library 0.5.51 → 0.5.53

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.
Files changed (50) hide show
  1. package/dist/add-order.scss +62 -13
  2. package/dist/allocationDetails.scss +438 -224
  3. package/dist/allocations.scss +172 -13
  4. package/dist/breadcrumbs.scss +13 -0
  5. package/dist/builder.js +1 -1
  6. package/dist/cart-details.scss +214 -0
  7. package/dist/cart-summary.scss +237 -854
  8. package/dist/cart.scss +57 -55
  9. package/dist/category-groups-product-image.scss +72 -21
  10. package/dist/faq.scss +48 -5
  11. package/dist/hotspot.scss +141 -74
  12. package/dist/icon-library.scss +78 -74
  13. package/dist/icon-list.scss +19 -1
  14. package/dist/image-temp.scss +17 -3
  15. package/dist/language-selector.scss +260 -76
  16. package/dist/light-box-v2.scss +4 -3
  17. package/dist/menu-v2.scss +51 -3
  18. package/dist/modal.scss +251 -28
  19. package/dist/my-templates.scss +11 -2
  20. package/dist/my-wishlist.scss +27 -17
  21. package/dist/product-basic-elements.scss +0 -246
  22. package/dist/product-image-allocation.scss +51 -15
  23. package/dist/product-image-bundles.scss +72 -15
  24. package/dist/product-image.scss +178 -19
  25. package/dist/profile.scss +44 -19
  26. package/dist/quota-details.scss +111 -11
  27. package/dist/repeater-embla-controls.scss +9 -1
  28. package/dist/repeater-grid-toggle.scss +42 -18
  29. package/dist/repeater-item.scss +34 -22
  30. package/dist/repeater.scss +69 -102
  31. package/dist/request-for-quotes.scss +15 -1
  32. package/dist/scroll.scss +52 -11
  33. package/dist/search.scss +1 -1
  34. package/dist/skeleton.scss +24 -35
  35. package/dist/tab-container.scss +14 -12
  36. package/dist/tab-v2.scss +178 -68
  37. package/dist/text-temp-v2.scss +11 -0
  38. package/dist/types/builder/tools/element-edit/allocationDetails.d.ts +17 -1
  39. package/dist/types/builder/tools/element-edit/breadcrumbs.d.ts +0 -5
  40. package/dist/types/builder/tools/element-edit/iconLibrary.d.ts +7 -1
  41. package/dist/types/builder/tools/element-edit/imageHotspot.d.ts +0 -1
  42. package/dist/types/builder/tools/element-edit/language-menu.d.ts +0 -14
  43. package/dist/types/builder/tools/element-edit/product-image.d.ts +1 -0
  44. package/dist/types/builder/tools/element-edit/repeater.d.ts +1 -1
  45. package/dist/types/builder/tools/element-edit/tabsV2.d.ts +55 -1
  46. package/dist/types/builder/tools/element-edit/userElements.d.ts +5 -0
  47. package/dist/types/builder/tools/element-edit/video.d.ts +32 -0
  48. package/dist/user-elements.scss +6 -0
  49. package/dist/video.scss +548 -476
  50. package/package.json +1 -1
@@ -56,6 +56,9 @@ $isFlexboxElementChild: ".flx > .wrapper > *";
56
56
  aspect-ratio: 1/0.01;
57
57
  }
58
58
  & > .wrapper {
59
+ // The element trades its fixed height for an aspect-ratio here, so the
60
+ // wrapper cannot keep tracking --_ctm-lt-ht.
61
+ height: 100%;
59
62
  & > div {
60
63
  height: 100%;
61
64
  }
@@ -83,10 +86,18 @@ $isFlexboxElementChild: ".flx > .wrapper > *";
83
86
 
84
87
  & > .wrapper {
85
88
  width: 100%;
89
+ // Padding, border and shadow below are painted on this box, so it has to
90
+ // match the element instead of sizing to the image. Without a definite
91
+ // border-box height the border lands outside the element's fixed height
92
+ // and the top/bottom edges get clipped; without border-box the width grows
93
+ // past the element and the outline sits wider than the image.
94
+ // Tracks the var rather than 100% because the element drops its own height
95
+ // while resizing, dragging or in full view.
96
+ height: prepareMediaVariable(--_ctm-lt-ht);
97
+ box-sizing: border-box;
86
98
  // overflow: clip;
87
99
  rotate: calc(var(--_ctm-dn-re) * 1deg);
88
100
 
89
- // height: 100%;
90
101
  &:is(:not(:has([class*="crop__main"]) *)) {
91
102
  padding: var(--_ctm-mob-lt-pg, var(--_ctm-tab-lt-pg, var(--_ctm-lt-pg)));
92
103
  background-color: var(--_ctm-mob-dn-bd-cr, var(--_ctm-tab-dn-bd-cr, var(--_ctm-dn-bd-cr)));
@@ -107,6 +118,7 @@ $isFlexboxElementChild: ".flx > .wrapper > *";
107
118
  // transform: scale(var(--_ctm-dn-zm-ie));
108
119
  scale: var(--_ctm-mob-dn-zm-ie, var(--_ctm-tab-dn-zm-ie, var(--_ctm-dn-zm-ie)));
109
120
  rotate: calc(var(--_ctm-dn-re) * 1deg);
121
+ overflow: hidden;
110
122
  }
111
123
  }
112
124
  &[data-show-shadow="false"] {
@@ -128,8 +140,10 @@ $isFlexboxElementChild: ".flx > .wrapper > *";
128
140
  --_sf-cd-gp: calc(var(--_sf-gp) * 0.5);
129
141
  row-gap: var(--_sf-gp);
130
142
  width: 100%;
131
- height: prepareMediaVariable(--_ctm-lt-ht);
132
- border-radius: var(--_ctm-mob-dn-br-rs, var(--_ctm-tab-dn-br-rs, var(--_ctm-dn-br-rs)));
143
+ // Fills the wrapper's content box, so padding and border inset the image
144
+ // instead of stacking on top of the element height.
145
+ height: 100%;
146
+ // border-radius: var(--_ctm-mob-dn-br-rs, var(--_ctm-tab-dn-br-rs, var(--_ctm-dn-br-rs)));
133
147
  // height: 100%;
134
148
  // &:is(:not(:has([class*="crop__main"]) *)) {
135
149
  // padding: var(--_ctm-mob-lt-pg, var(--_ctm-tab-lt-pg, var(--_ctm-lt-pg)));
@@ -1,7 +1,44 @@
1
- @use "sass:map";
1
+ @use "sass:map";
2
2
  @use "sass:list";
3
3
  @use "./functions.scss" as *;
4
4
 
5
+ // Widget Style > Placeholder Text. The section is per-state (Default / Hover) and its
6
+ // typography reached the stylesheet as `--_ctm-dn-wt-se-{dt,hr}-se-*` that nothing
7
+ // read, so both states looked dead in the panel. Both states publish the same
8
+ // `--_sf-wt-*` names and the hovered widget wins the cascade.
9
+ //
10
+ // Deliberately no final fallback inside these chains: an untouched property stays
11
+ // invalid at computed-value time, which is what lets the consumers fall back to
12
+ // `--_ctm-dn-wt-pr-tt-*`. Those come from the retired Widget Placeholder Text
13
+ // section — Widget Style absorbed it, so the fallback exists only for pages saved
14
+ // before the merge. Same shape the divider already uses for its
15
+ // hover-falls-back-to-default chain below.
16
+ $widgetFontProps:
17
+ ft-fy, ft-se, cr, ft-wt, ft-se-ic, ue, tt-an, lr-sg, le-ht, tt-tm, wd-wp, wd-bk, pg;
18
+
19
+ @mixin widgetStateFont($state, $fallbackState: null) {
20
+ @each $p in $widgetFontProps {
21
+ $inner: if(
22
+ $fallbackState == null,
23
+ var(--_ctm-dn-wt-se-#{$state}-#{$p}),
24
+ var(
25
+ --_ctm-dn-wt-se-#{$state}-#{$p},
26
+ var(
27
+ --_ctm-mob-dn-wt-se-#{$fallbackState}-#{$p},
28
+ var(
29
+ --_ctm-tab-dn-wt-se-#{$fallbackState}-#{$p},
30
+ var(--_ctm-dn-wt-se-#{$fallbackState}-#{$p})
31
+ )
32
+ )
33
+ )
34
+ );
35
+ --_sf-wt-#{$p}: var(
36
+ --_ctm-mob-dn-wt-se-#{$state}-#{$p},
37
+ var(--_ctm-tab-dn-wt-se-#{$state}-#{$p}, #{$inner})
38
+ );
39
+ }
40
+ }
41
+
5
42
  [data-div-type="element"] {
6
43
  &[data-element-type="languageMenu"],
7
44
  &[data-element-type="currencySelector"],
@@ -115,7 +152,7 @@
115
152
  display: flex;
116
153
  gap: var(--_ctm-mob-lt-gp-bn-is, var(--_ctm-tab-lt-gp-bn-is, var(--_ctm-lt-gp-bn-is)));
117
154
 
118
- // "Show Border" switches widget style (default/hover), widget dropdown and
155
+ // "Show Border" switches — widget style (default/hover), widget dropdown and
119
156
  // item style (default/hover/selected). Each state is gated on its own switch.
120
157
  // border-style is reset alongside the width: a state whose width variables are
121
158
  // unset resolves border-width to the initial `medium`, so zeroing the width
@@ -236,6 +273,18 @@
236
273
  --_ctm-mob-dn-im-se-hr-se-ue,
237
274
  var(--_ctm-tab-dn-im-se-hr-se-ue, var(--_ctm-dn-im-se-hr-se-ue))
238
275
  );
276
+ --_sf-hr-tt-tm: var(
277
+ --_ctm-mob-dn-im-se-hr-se-tt-tm,
278
+ var(--_ctm-tab-dn-im-se-hr-se-tt-tm, var(--_ctm-dn-im-se-hr-se-tt-tm))
279
+ );
280
+ --_sf-hr-wd-wp: var(
281
+ --_ctm-mob-dn-im-se-hr-se-wd-wp,
282
+ var(--_ctm-tab-dn-im-se-hr-se-wd-wp, var(--_ctm-dn-im-se-hr-se-wd-wp))
283
+ );
284
+ --_sf-hr-wd-bk: var(
285
+ --_ctm-mob-dn-im-se-hr-se-wd-bk,
286
+ var(--_ctm-tab-dn-im-se-hr-se-wd-bk, var(--_ctm-dn-im-se-hr-se-wd-bk))
287
+ );
239
288
  --_sf-hr-pg: var(
240
289
  --_ctm-mob-dn-im-se-hr-se-pg,
241
290
  var(--_ctm-tab-dn-im-se-hr-se-pg, var(--_ctm-dn-im-se-hr-se-pg))
@@ -259,6 +308,13 @@
259
308
  --_ctm-mob-dn-im-se-sd-se-br-wh,
260
309
  var(--_ctm-tab-dn-im-se-sd-se-br-wh, var(--_ctm-dn-im-se-sd-se-br-wh))
261
310
  );
311
+ // Was missing entirely, so `border-radius: var(--_sf-sd-br-rs, <default state>)`
312
+ // always fell through to the default state and Selected > Border Radius did
313
+ // nothing. Every sibling state variable had one; this is the odd one out.
314
+ --_sf-sd-br-rs: var(
315
+ --_ctm-mob-dn-im-se-sd-se-br-rs,
316
+ var(--_ctm-tab-dn-im-se-sd-se-br-rs, var(--_ctm-dn-im-se-sd-se-br-rs))
317
+ );
262
318
  // new
263
319
  --_sf-sd-sw-ae: var(
264
320
  --_ctm-mob-dn-im-se-sd-se-sw-ae,
@@ -316,29 +372,24 @@
316
372
  --_ctm-mob-dn-im-se-sd-se-ue,
317
373
  var(--_ctm-tab-dn-im-se-sd-se-ue, var(--_ctm-dn-im-se-sd-se-ue))
318
374
  );
375
+ --_sf-sd-tt-tm: var(
376
+ --_ctm-mob-dn-im-se-sd-se-tt-tm,
377
+ var(--_ctm-tab-dn-im-se-sd-se-tt-tm, var(--_ctm-dn-im-se-sd-se-tt-tm))
378
+ );
379
+ --_sf-sd-wd-wp: var(
380
+ --_ctm-mob-dn-im-se-sd-se-wd-wp,
381
+ var(--_ctm-tab-dn-im-se-sd-se-wd-wp, var(--_ctm-dn-im-se-sd-se-wd-wp))
382
+ );
383
+ --_sf-sd-wd-bk: var(
384
+ --_ctm-mob-dn-im-se-sd-se-wd-bk,
385
+ var(--_ctm-tab-dn-im-se-sd-se-wd-bk, var(--_ctm-dn-im-se-sd-se-wd-bk))
386
+ );
319
387
  --_sf-sd-pg: var(
320
388
  --_ctm-mob-dn-im-se-sd-se-pg,
321
389
  var(--_ctm-tab-dn-im-se-sd-se-pg, var(--_ctm-dn-im-se-sd-se-pg))
322
390
  );
323
391
  }
324
392
 
325
- &[data-flag-style="Rounded"] {
326
- .language__flag {
327
- border-radius: 5px;
328
- svg {
329
- border-radius: 5px;
330
- }
331
- }
332
- }
333
- &[data-flag-style="Circle"] {
334
- .language__flag {
335
- border-radius: 50%;
336
- svg {
337
- border-radius: 50%;
338
- }
339
- }
340
- }
341
-
342
393
  .option {
343
394
  width: 100%;
344
395
  display: flex;
@@ -348,6 +399,9 @@
348
399
 
349
400
  position: relative;
350
401
  box-sizing: border-box;
402
+ // Without this a flex item refuses to shrink below its content width, so a
403
+ // larger font size pushed the label straight out of the widget.
404
+ min-width: 0;
351
405
 
352
406
  padding: var(--_sf-hr-pg, prepareMediaVariable(--_ctm-dn-im-se-dt-se-pg));
353
407
  gap: var(--_ctm-mob-lt-im-sg, var(--_ctm-tab-lt-im-sg, var(--_ctm-lt-im-sg)));
@@ -364,6 +418,10 @@
364
418
  var(--_sf-hr-sw-cr, prepareMediaVariable(--_ctm-dn-im-se-dt-se-sw-cr));
365
419
  //
366
420
  &[data-selected="true"] {
421
+ // `.option` only ever declared padding from the hover variable, so
422
+ // `--_sf-sd-pg` was set by the selected-state block but never read and
423
+ // Selected > Padding did nothing.
424
+ padding: var(--_sf-sd-pg, prepareMediaVariable(--_ctm-dn-im-se-dt-se-pg));
367
425
  border-color: var(--_sf-sd-br-cr, prepareMediaVariable(--_ctm-dn-im-se-dt-se-br-cr));
368
426
 
369
427
  background-color: var(--_sf-sd-bd-cr, prepareMediaVariable(--_ctm-dn-im-se-dt-se-bd-cr));
@@ -387,7 +445,17 @@
387
445
  letter-spacing: var(--_sf-sd-lr-sg, prepareMediaVariable(--_ctm-dn-im-se-dt-se-lr-sg));
388
446
  line-height: var(--_sf-sd-le-ht, prepareMediaVariable(--_ctm-dn-im-se-dt-se-le-ht-dc));
389
447
  text-decoration: var(--_sf-sd-ue, prepareMediaVariable(--_ctm-dn-im-se-dt-se-ue));
390
- @include restrictToLinesShow(1);
448
+ text-transform: var(--_sf-sd-tt-tm, prepareMediaVariable(--_ctm-dn-im-se-dt-se-tt-tm));
449
+ word-wrap: var(
450
+ --_sf-sd-wd-wp,
451
+ prepareMediaVariable(--_ctm-dn-im-se-dt-se-wd-wp, normal)
452
+ );
453
+ word-break: var(
454
+ --_sf-sd-wd-bk,
455
+ prepareMediaVariable(--_ctm-dn-im-se-dt-se-wd-bk, normal)
456
+ );
457
+ -webkit-line-clamp: var(--_sf-it-clamp-sd, var(--_sf-it-clamp, 1));
458
+ white-space: var(--_sf-it-ws-sd, var(--_sf-it-ws, nowrap));
391
459
  }
392
460
  }
393
461
  }
@@ -399,7 +467,55 @@
399
467
  &[data-flex-direction="row"] {
400
468
  overflow-x: auto;
401
469
  }
402
- &[data-show-divider="true"] {
470
+ // Matched when *either* state wants a divider, so the rules below exist and each
471
+ // state can then decide visibility for itself — gating on the default state alone
472
+ // meant a divider switched on only for hover could never appear.
473
+ &:is([data-show-divider="true"], [data-show-divider-hover="true"]) {
474
+ // Divider weight/colour resolve through these two, so the hover block below
475
+ // only has to re-point them. Previously the declarations read the default
476
+ // state's variables directly and the Widget Style > Hover > Divider controls
477
+ // wrote to `--_ctm-dn-wt-se-hr-se-dr-*`, which nothing ever read.
478
+ --_sf-dr-wt: var(
479
+ --_ctm-mob-dn-wt-se-dt-se-dr-wt,
480
+ var(--_ctm-tab-dn-wt-se-dt-se-dr-wt, var(--_ctm-dn-wt-se-dt-se-dr-wt))
481
+ );
482
+ --_sf-dr-cr: var(
483
+ --_ctm-mob-dn-wt-se-dt-se-dr-cr,
484
+ var(--_ctm-tab-dn-wt-se-dt-se-dr-cr, var(--_ctm-dn-wt-se-dt-se-dr-cr))
485
+ );
486
+
487
+ // Divider lives under Widget Style, so its hover state is the *widget* being
488
+ // hovered, not an individual option. Scoping this to `.option:hover` only
489
+ // repainted the hovered option's own divider, which read as "not working".
490
+ &:hover {
491
+ --_sf-dr-wt: var(
492
+ --_ctm-mob-dn-wt-se-hr-se-dr-wt,
493
+ var(
494
+ --_ctm-tab-dn-wt-se-hr-se-dr-wt,
495
+ var(
496
+ --_ctm-dn-wt-se-hr-se-dr-wt,
497
+ var(
498
+ --_ctm-mob-dn-wt-se-dt-se-dr-wt,
499
+ var(--_ctm-tab-dn-wt-se-dt-se-dr-wt, var(--_ctm-dn-wt-se-dt-se-dr-wt))
500
+ )
501
+ )
502
+ )
503
+ );
504
+ --_sf-dr-cr: var(
505
+ --_ctm-mob-dn-wt-se-hr-se-dr-cr,
506
+ var(
507
+ --_ctm-tab-dn-wt-se-hr-se-dr-cr,
508
+ var(
509
+ --_ctm-dn-wt-se-hr-se-dr-cr,
510
+ var(
511
+ --_ctm-mob-dn-wt-se-dt-se-dr-cr,
512
+ var(--_ctm-tab-dn-wt-se-dt-se-dr-cr, var(--_ctm-dn-wt-se-dt-se-dr-cr))
513
+ )
514
+ )
515
+ )
516
+ );
517
+ }
518
+
403
519
  &[data-flex-direction="row"] {
404
520
  .option:not(:last-child)::before {
405
521
  content: "";
@@ -416,14 +532,8 @@
416
532
  2
417
533
  )
418
534
  ); /* Half of your gap, assuming divider is centered in the gap */
419
- width: var(
420
- --_ctm-mob-dn-wt-se-dr-wt,
421
- var(--_ctm-tab-dn-wt-se-dt-se-dr-wt, var(--_ctm-dn-wt-se-dt-se-dr-wt))
422
- ); /* Divider thickness */
423
- background-color: var(
424
- --_ctm-mob-dn-wt-se-dt-se-dr-cr,
425
- var(--_ctm-tab-dn-wt-se-dt-se-dr-cr, var(--_ctm-dn-wt-se-dt-se-dr-cr))
426
- ); /* Divider color */
535
+ width: var(--_sf-dr-wt); /* Divider thickness */
536
+ background-color: var(--_sf-dr-cr); /* Divider color */
427
537
  }
428
538
  }
429
539
  &[data-flex-direction="column"] {
@@ -442,16 +552,23 @@
442
552
  2
443
553
  )
444
554
  );
445
- height: var(
446
- --_ctm-mob-dn-wt-se-dt-se-dr-wt,
447
- var(--_ctm-tab-dn-wt-se-dt-se-dr-wt, var(--_ctm-dn-wt-se-dt-se-dr-wt))
448
- );
449
- background-color: var(
450
- --_ctm-mob-dn-wt-se-dt-se-dr-cr,
451
- var(--_ctm-tab-dn-wt-se-dt-se-dr-cr, var(--_ctm-dn-wt-se-dt-se-dr-cr))
452
- );
555
+ height: var(--_sf-dr-wt);
556
+ background-color: var(--_sf-dr-cr);
453
557
  }
454
558
  }
559
+
560
+ // Each state's own Show Divider switch. Declared last so they win over the
561
+ // `::before` rules above, and split by state so turning the divider off for
562
+ // hover only affects the hovered widget.
563
+ &[data-show-divider="false"] .option::before {
564
+ display: none;
565
+ }
566
+ &[data-show-divider-hover="false"]:hover .option::before {
567
+ display: none;
568
+ }
569
+ &[data-show-divider-hover="true"]:hover .option:not(:last-child)::before {
570
+ display: block;
571
+ }
455
572
  }
456
573
 
457
574
  .option_select {
@@ -461,30 +578,30 @@
461
578
  justify-content: var(--_ctm-mob-lt-at, var(--_ctm-tab-lt-at, var(--_ctm-lt-at)));
462
579
 
463
580
  position: relative;
581
+ min-width: 0;
464
582
 
465
- // padding: var(--_ctm-mob-lt-im-pg, var(--_ctm-tab-lt-im-pg, var(--_ctm-lt-im-pg)));
583
+ // Widget Style > padding (was Widget Placeholder Text > padding). It used to sit
584
+ // on `.value__selected__new` only, which is the *empty* state — as soon as an
585
+ // option was selected the markup switched to this branch and the padding
586
+ // appeared to do nothing.
587
+ padding: var(--_sf-wt-pg, prepareMediaVariable(--_ctm-dn-wt-pr-tt-pg));
466
588
  gap: var(--_ctm-mob-lt-im-sg, var(--_ctm-tab-lt-im-sg, var(--_ctm-lt-im-sg)));
467
589
  .language__name {
468
590
  width: 100%;
469
- font-family: prepareMediaVariable(--_ctm-dn-wt-pr-tt-ft-fy);
470
- font-size: prepareMediaVariable(--_ctm-dn-wt-pr-tt-ft-se);
471
- color: prepareMediaVariable(--_ctm-dn-wt-pr-tt-cr);
472
- font-weight: prepareMediaVariable(--_ctm-dn-wt-pr-tt-ft-wt);
473
- text-decoration: prepareMediaVariable(--_ctm-dn-wt-pr-tt-ue);
474
- font-style: prepareMediaVariable(--_ctm-dn-wt-pr-tt-ft-se-ic);
475
- text-align: prepareMediaVariable(--_ctm-dn-wt-pr-tt-tt-an);
476
- letter-spacing: prepareMediaVariable(--_ctm-dn-wt-pr-tt-lr-sg);
477
- line-height: prepareMediaVariable(--_ctm-dn-wt-pr-tt-le-ht);
478
- @include restrictToLinesShow(1);
479
- }
480
- }
481
- .language__flag {
482
- width: var(--_ctm-mob-lt-fg-se, var(--_ctm-tab-lt-fg-se, var(--_ctm-lt-fg-se)));
483
- height: var(--_ctm-mob-lt-fg-se, var(--_ctm-tab-lt-fg-se, var(--_ctm-lt-fg-se)));
484
- object-fit: cover;
485
- > svg {
486
- width: 100%;
487
- height: 100%;
591
+ // Widget Style's per-state values first; the retired Widget Placeholder Text
592
+ // variables remain only as a fallback for pages saved before the two merged.
593
+ font-family: var(--_sf-wt-ft-fy, prepareMediaVariable(--_ctm-dn-wt-pr-tt-ft-fy));
594
+ font-size: var(--_sf-wt-ft-se, prepareMediaVariable(--_ctm-dn-wt-pr-tt-ft-se));
595
+ color: var(--_sf-wt-cr, prepareMediaVariable(--_ctm-dn-wt-pr-tt-cr));
596
+ font-weight: var(--_sf-wt-ft-wt, prepareMediaVariable(--_ctm-dn-wt-pr-tt-ft-wt));
597
+ text-decoration: var(--_sf-wt-ue, prepareMediaVariable(--_ctm-dn-wt-pr-tt-ue));
598
+ font-style: var(--_sf-wt-ft-se-ic, prepareMediaVariable(--_ctm-dn-wt-pr-tt-ft-se-ic));
599
+ text-align: var(--_sf-wt-tt-an, prepareMediaVariable(--_ctm-dn-wt-pr-tt-tt-an));
600
+ letter-spacing: var(--_sf-wt-lr-sg, prepareMediaVariable(--_ctm-dn-wt-pr-tt-lr-sg));
601
+ line-height: var(--_sf-wt-le-ht, prepareMediaVariable(--_ctm-dn-wt-pr-tt-le-ht));
602
+ text-transform: var(--_sf-wt-tt-tm, prepareMediaVariable(--_ctm-dn-wt-pr-tt-tt-tm));
603
+ word-wrap: var(--_sf-wt-wd-wp, prepareMediaVariable(--_ctm-dn-wt-pr-tt-wd-wp, normal));
604
+ word-break: var(--_sf-wt-wd-bk, prepareMediaVariable(--_ctm-dn-wt-pr-tt-wd-bk, normal));
488
605
  }
489
606
  }
490
607
 
@@ -498,8 +615,34 @@
498
615
  letter-spacing: var(--_sf-hr-lr-sg, prepareMediaVariable(--_ctm-dn-im-se-dt-se-lr-sg));
499
616
  line-height: var(--_sf-hr-le-ht, prepareMediaVariable(--_ctm-dn-im-se-dt-se-le-ht));
500
617
  text-decoration: var(--_sf-hr-ue, prepareMediaVariable(--_ctm-dn-im-se-dt-se-ue));
501
- white-space: nowrap;
502
- @include restrictToLinesShow(1);
618
+ text-transform: var(--_sf-hr-tt-tm, prepareMediaVariable(--_ctm-dn-im-se-dt-se-tt-tm));
619
+ word-wrap: var(--_sf-hr-wd-wp, prepareMediaVariable(--_ctm-dn-im-se-dt-se-wd-wp, normal));
620
+ word-break: var(--_sf-hr-wd-bk, prepareMediaVariable(--_ctm-dn-im-se-dt-se-wd-bk, normal));
621
+
622
+ // text-align only has room to act once the label owns the line box — as a
623
+ // content-sized flex item it hugged its text, so every alignment looked the
624
+ // same. `min-width: 0` keeps it shrinkable so a larger font size truncates
625
+ // instead of overflowing the widget.
626
+ flex: 1 1 auto;
627
+ min-width: 0;
628
+ max-width: 100%;
629
+
630
+ // Text Overflow is driven entirely by the two clamp custom properties the
631
+ // element sets per interaction state (see LanguageMenuElement/DropdownComponent):
632
+ // off resolves to 1 nowrap line, on to N wrapped lines. Keeping the box display
633
+ // constant means the hover and selected rules below only have to swap the pair,
634
+ // which a marker class could not express.
635
+ display: -webkit-box;
636
+ -webkit-box-orient: vertical;
637
+ overflow: hidden;
638
+ text-overflow: ellipsis;
639
+ -webkit-line-clamp: var(--_sf-it-clamp, 1);
640
+ white-space: var(--_sf-it-ws, nowrap);
641
+ }
642
+
643
+ .option:hover .language__name {
644
+ -webkit-line-clamp: var(--_sf-it-clamp-hr, var(--_sf-it-clamp, 1));
645
+ white-space: var(--_sf-it-ws-hr, var(--_sf-it-ws, nowrap));
503
646
  }
504
647
 
505
648
  //Dropdown
@@ -507,18 +650,31 @@
507
650
  width: 100%;
508
651
  // padding: 8px 12px;
509
652
  // text-align: left;
510
- font-family: prepareMediaVariable(--_ctm-dn-wt-pr-tt-ft-fy);
511
- font-size: prepareMediaVariable(--_ctm-dn-wt-pr-tt-ft-se);
512
- color: prepareMediaVariable(--_ctm-dn-wt-pr-tt-cr);
653
+ // Same order as `.option_select .language__name` above: Widget Style's per-state
654
+ // typography first, Widget Placeholder Text second. This is the empty branch —
655
+ // the two swap in the markup as soon as an option is picked, so they have to
656
+ // resolve identically or the text would jump on first selection.
657
+ font-family: var(--_sf-wt-ft-fy, prepareMediaVariable(--_ctm-dn-wt-pr-tt-ft-fy));
658
+ font-size: var(--_sf-wt-ft-se, prepareMediaVariable(--_ctm-dn-wt-pr-tt-ft-se));
659
+ color: var(--_sf-wt-cr, prepareMediaVariable(--_ctm-dn-wt-pr-tt-cr));
513
660
  // color: var(--_gray-600);
514
- font-weight: prepareMediaVariable(--_ctm-dn-wt-pr-tt-ft-wt);
515
- text-decoration: prepareMediaVariable(--_ctm-dn-wt-pr-tt-ue);
516
- font-style: prepareMediaVariable(--_ctm-dn-wt-pr-tt-ft-se-ic);
517
- text-align: prepareMediaVariable(--_ctm-dn-wt-pr-tt-tt-an);
518
- letter-spacing: prepareMediaVariable(--_ctm-dn-wt-pr-tt-lr-sg);
519
- line-height: prepareMediaVariable(--_ctm-dn-wt-pr-tt-le-ht);
520
- padding: prepareMediaVariable(--_ctm-dn-wt-pr-tt-pg);
521
- @include restrictToLinesShow(1);
661
+ font-weight: var(--_sf-wt-ft-wt, prepareMediaVariable(--_ctm-dn-wt-pr-tt-ft-wt));
662
+ text-decoration: var(--_sf-wt-ue, prepareMediaVariable(--_ctm-dn-wt-pr-tt-ue));
663
+ font-style: var(--_sf-wt-ft-se-ic, prepareMediaVariable(--_ctm-dn-wt-pr-tt-ft-se-ic));
664
+ text-align: var(--_sf-wt-tt-an, prepareMediaVariable(--_ctm-dn-wt-pr-tt-tt-an));
665
+ letter-spacing: var(--_sf-wt-lr-sg, prepareMediaVariable(--_ctm-dn-wt-pr-tt-lr-sg));
666
+ line-height: var(--_sf-wt-le-ht, prepareMediaVariable(--_ctm-dn-wt-pr-tt-le-ht));
667
+ padding: var(--_sf-wt-pg, prepareMediaVariable(--_ctm-dn-wt-pr-tt-pg));
668
+ text-transform: var(--_sf-wt-tt-tm, prepareMediaVariable(--_ctm-dn-wt-pr-tt-tt-tm));
669
+ word-wrap: var(--_sf-wt-wd-wp, prepareMediaVariable(--_ctm-dn-wt-pr-tt-wd-wp, normal));
670
+ word-break: var(--_sf-wt-wd-bk, prepareMediaVariable(--_ctm-dn-wt-pr-tt-wd-bk, normal));
671
+ min-width: 0;
672
+ display: -webkit-box;
673
+ -webkit-box-orient: vertical;
674
+ overflow: hidden;
675
+ text-overflow: ellipsis;
676
+ -webkit-line-clamp: var(--_sf-it-clamp, 1);
677
+ white-space: var(--_sf-it-ws, nowrap);
522
678
  }
523
679
  .est__dropdown__main {
524
680
  position: relative;
@@ -547,6 +703,11 @@
547
703
 
548
704
  .dropdown__button__wrapper {
549
705
  width: 100%;
706
+ // Widget Style > Placeholder Text, default state. Published here rather than
707
+ // on the text nodes because the hover state below has to override it, and
708
+ // `.value__selected__new` / `.option_select .language__name` are two separate
709
+ // branches of the same markup.
710
+ @include widgetStateFont(dt-se);
550
711
  padding: var(--_ctm-mob-lt-im-pg, var(--_ctm-tab-lt-im-pg, var(--_ctm-lt-im-pg)));
551
712
  background-color: var(
552
713
  --_ctm-mob-dn-wt-se-dt-se-bd-cr,
@@ -593,6 +754,9 @@
593
754
  )
594
755
  );
595
756
  &:hover {
757
+ // Hover state, falling back to the default state per property so a widget
758
+ // that only sets a hover colour keeps the default font, size and the rest.
759
+ @include widgetStateFont(hr-se, dt-se);
596
760
  background-color: var(
597
761
  --_ctm-mob-dn-wt-se-hr-se-bd-cr,
598
762
  var(--_ctm-tab-dn-wt-se-hr-se-bd-cr, var(--_ctm-dn-wt-se-hr-se-bd-cr))
@@ -639,13 +803,24 @@
639
803
  );
640
804
  }
641
805
  .option_select {
642
- // padding-block: unset;
643
- // display: -webkit-box;
644
- -webkit-line-clamp: 1;
645
- -webkit-box-orient: vertical;
806
+ // Truncation is handled by `.language__name` inside, which knows whether
807
+ // Text Overflow is on and how many lines to clamp to. A `white-space:
808
+ // nowrap` here inherited down and defeated the multi-line clamp.
646
809
  overflow: hidden;
647
- text-overflow: ellipsis;
648
- white-space: nowrap;
810
+ }
811
+
812
+ // Widget Style > Hover > Text Overflow. The clamp pair reaches the DOM as an
813
+ // inline style (it is `controls`, not CSS), so hover cannot be expressed by
814
+ // the variable cascade above — the element publishes both pairs on the label
815
+ // and this rule chooses the hovered one, falling back to the default pair.
816
+ // Safe to scope on the wrapper: the options list is its sibling, not a
817
+ // descendant, so option labels keep their own Item Style clamp.
818
+ &:hover {
819
+ .language__name,
820
+ .value__selected__new {
821
+ -webkit-line-clamp: var(--_sf-it-clamp-hr, var(--_sf-it-clamp, 1));
822
+ white-space: var(--_sf-it-ws-hr, var(--_sf-it-ws, nowrap));
823
+ }
649
824
  }
650
825
  }
651
826
 
@@ -655,6 +830,15 @@
655
830
  width: 100%;
656
831
  position: relative;
657
832
  gap: 8px;
833
+ // Keeps the label shrinkable so a larger font size truncates instead of
834
+ // pushing the toggle icon out of the widget.
835
+ min-width: 0;
836
+
837
+ & > .option_select,
838
+ & > .value__selected__new {
839
+ flex: 1 1 auto;
840
+ min-width: 0;
841
+ }
658
842
  }
659
843
 
660
844
  .est__dropdown__icon {
@@ -22,9 +22,9 @@ $activeElementSelector: "[data-has-clicked='true']";
22
22
  0.00625 * (var(--_cms-scaling-factor) - var(--_cms-scrollbar-width))
23
23
  );
24
24
 
25
- &:has(#{$activeElementSelector}) {
26
- // border: 1px solid var(--_accent-color-2-500);
27
- }
25
+ // &:has(#{$activeElementSelector}) {
26
+ // // border: 1px solid var(--_accent-color-2-500);
27
+ // }
28
28
 
29
29
  & > div {
30
30
  &#{$mnwr} {
@@ -54,6 +54,7 @@ $activeElementSelector: "[data-has-clicked='true']";
54
54
  );
55
55
  max-width: 100%;
56
56
  max-height: 9999px;
57
+ padding: prepareMediaVariable(--_ctm-lig-lt-pg);
57
58
  &[data-background-type="color"] {
58
59
  background-color: prepareMediaVariable(--_ctm-lig-dn-bd-cr);
59
60
  }