@sc-360-v2/storefront-cms-library 0.5.68 → 0.5.70

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/dist/filters.scss CHANGED
@@ -1751,7 +1751,7 @@ $resizeActive: '[data-cms-element-resizer="true"]';
1751
1751
  // taller than one line of label text, and centring made a wrapped label sit
1752
1752
  // visibly off its box. Starting both at the top keeps the box level with the
1753
1753
  // label's first line at any size.
1754
- align-items: flex-start;
1754
+ align-items: center;
1755
1755
  gap: 8px;
1756
1756
  position: relative;
1757
1757
  // margin-bottom: 12px;
@@ -353,12 +353,24 @@ $overflowSelector: ".flex__overflow";
353
353
  .gallery-slider-element {
354
354
  flex-direction: row;
355
355
  }
356
- .gallery-header {
357
- // Text Container Width; fit-content is the previous behaviour.
358
- width: prepareMediaVariable(--_ctm-dn-gy-wt-lt-tt-cr-wh, fit-content);
356
+ // Child combinator: as a plain descendant this also matched the per-item captions
357
+ // inside the slides, so the widget's text position resized those too.
358
+ .gallery-slider-element > .gallery-header {
359
+ // Beside the slider, Text Container Width is a ceiling rather than a fixed width
360
+ // (what the schema comment describes). It is always emitted as 100%, so used as
361
+ // `width` it made the header's flex basis the whole row: no free space for the
362
+ // slider to grow into and no overflow to shrink anyone, leaving the slider 0px.
363
+ width: fit-content;
364
+ max-width: prepareMediaVariable(--_ctm-dn-gy-wt-lt-tt-cr-wh, 100%);
359
365
  min-width: 0;
366
+ flex-shrink: 1;
360
367
  height: 100%;
361
368
  }
369
+ // The slider takes whatever the caption leaves.
370
+ .gallery-slider-element > .embla {
371
+ flex: 1 1 0;
372
+ min-width: 0;
373
+ }
362
374
  &[data-widget-alignment="top"] {
363
375
  .gallery-slider-element {
364
376
  align-items: flex-start;
@@ -385,12 +397,18 @@ $overflowSelector: ".flex__overflow";
385
397
  }
386
398
  }
387
399
  &[data-text-position="right"] {
388
- .gallery-header {
389
- // Text Container Width; fit-content is the previous behaviour.
390
- width: prepareMediaVariable(--_ctm-dn-gy-wt-lt-tt-cr-wh, fit-content);
400
+ // Same pair as the "left" block above — see the comments there.
401
+ .gallery-slider-element > .gallery-header {
402
+ width: fit-content;
403
+ max-width: prepareMediaVariable(--_ctm-dn-gy-wt-lt-tt-cr-wh, 100%);
391
404
  min-width: 0;
405
+ flex-shrink: 1;
392
406
  height: 100%;
393
407
  }
408
+ .gallery-slider-element > .embla {
409
+ flex: 1 1 0;
410
+ min-width: 0;
411
+ }
394
412
  .gallery-slider-element {
395
413
  flex-direction: row-reverse;
396
414
  }
@@ -1483,6 +1501,10 @@ $overflowSelector: ".flex__overflow";
1483
1501
  var(--_ctm-tab-dn-im-se-wd-bk, var(--_ctm-dn-im-se-wd-bk))
1484
1502
  );
1485
1503
 
1504
+ &#{$overflowSelector} {
1505
+ @include restrictToLinesShow(#{var(--_sf-line-clamp, 1)});
1506
+ }
1507
+
1486
1508
  font-size: var(
1487
1509
  --_ctm-mob-dn-im-se-ft-se,
1488
1510
  var(--_ctm-tab-dn-im-se-ft-se, var(--_ctm-dn-im-se-ft-se))
@@ -1542,6 +1564,10 @@ $overflowSelector: ".flex__overflow";
1542
1564
  var(--_ctm-tab-dn-im-se-wd-bk-dc, var(--_ctm-dn-im-se-wd-bk-dc))
1543
1565
  );
1544
1566
 
1567
+ &#{$overflowSelector} {
1568
+ @include restrictToLinesShow(#{var(--_sf-line-clamp-desc, 1)});
1569
+ }
1570
+
1545
1571
  font-size: var(
1546
1572
  --_ctm-mob-dn-im-se-ft-se-dc,
1547
1573
  var(--_ctm-tab-dn-im-se-ft-se-dc, var(--_ctm-dn-im-se-ft-se-dc))
@@ -1631,11 +1657,26 @@ $overflowSelector: ".flex__overflow";
1631
1657
  flex-direction: row;
1632
1658
 
1633
1659
  .gallery-header {
1634
- // Text Container Width; fit-content is the previous behaviour.
1635
- width: prepareMediaVariable(--_ctm-dn-gy-wt-lt-tt-cr-wh, fit-content);
1660
+ // The item's own Text Container Width, not the widget's. This read
1661
+ // --_ctm-dn-gy-wt-lt-tt-cr-wh, which is always emitted as 100%; combined with
1662
+ // the header's `flex: 0 0 auto` it never gave any of that width back, so the
1663
+ // image was squeezed to 0px and vanished. There is no item-level control yet,
1664
+ // so this falls back to fit-content and the caption sizes to its own text.
1665
+ width: fit-content;
1666
+ max-width: prepareMediaVariable(--_ctm-dn-im-lt-tt-cr-wh, 100%);
1636
1667
  min-width: 0;
1668
+ // Beside the image the caption has to be able to give way. The base rule's
1669
+ // flex-shrink 0 is right for the stacked positions, not for these.
1670
+ flex-shrink: 1;
1637
1671
  height: 100%;
1638
1672
  }
1673
+
1674
+ // The image takes whatever the caption leaves. Scoped to the row directions —
1675
+ // in top/bottom the main axis is vertical and a flex-basis here would break it.
1676
+ > img {
1677
+ flex: 1 1 0;
1678
+ min-width: 0;
1679
+ }
1639
1680
  &[data-widget-alignment="top"] {
1640
1681
  align-items: flex-start;
1641
1682
 
@@ -1661,12 +1702,27 @@ $overflowSelector: ".flex__overflow";
1661
1702
  &[data-text-position="right"] {
1662
1703
  flex-direction: row-reverse;
1663
1704
  .gallery-header {
1664
- // Text Container Width; fit-content is the previous behaviour.
1665
- width: prepareMediaVariable(--_ctm-dn-gy-wt-lt-tt-cr-wh, fit-content);
1705
+ // The item's own Text Container Width, not the widget's. This read
1706
+ // --_ctm-dn-gy-wt-lt-tt-cr-wh, which is always emitted as 100%; combined with
1707
+ // the header's `flex: 0 0 auto` it never gave any of that width back, so the
1708
+ // image was squeezed to 0px and vanished. There is no item-level control yet,
1709
+ // so this falls back to fit-content and the caption sizes to its own text.
1710
+ width: fit-content;
1711
+ max-width: prepareMediaVariable(--_ctm-dn-im-lt-tt-cr-wh, 100%);
1666
1712
  min-width: 0;
1713
+ // Beside the image the caption has to be able to give way. The base rule's
1714
+ // flex-shrink 0 is right for the stacked positions, not for these.
1715
+ flex-shrink: 1;
1667
1716
  height: 100%;
1668
1717
  }
1669
1718
 
1719
+ // The image takes whatever the caption leaves. Scoped to the row directions —
1720
+ // in top/bottom the main axis is vertical and a flex-basis here would break it.
1721
+ > img {
1722
+ flex: 1 1 0;
1723
+ min-width: 0;
1724
+ }
1725
+
1670
1726
  &[data-widget-alignment="top"] {
1671
1727
  align-items: flex-start;
1672
1728
 
@@ -136,6 +136,13 @@ $pos2: (
136
136
  display: var(--_d-flex);
137
137
  gap: var(--_in_hr-gp, prepareMediaVariable(--_ctm-dn-in-dt-se-in-gp, 0px));
138
138
 
139
+ // Icon Position (layout.iconPosition). Absent on elements saved before
140
+ // the control existed, which the schema backfills as "left", so they
141
+ // keep the icon-left / text-right row.
142
+ &:is(.wrapper[data-icon-position="top"]>*) {
143
+ flex-direction: column;
144
+ }
145
+
139
146
  &:hover {
140
147
  --_in_hr-gp: #{prepareMediaVariable(--_ctm-dn-in-hr-se-in-gp, 0px)};
141
148
  --_in-hr-sz: #{prepareMediaVariable(--_ctm-dn-in-hr-se-in-se)};
@@ -219,6 +226,38 @@ $pos2: (
219
226
  height: prepareMediaVariable(--_ctm-dn-tt-cr-dr-wh);
220
227
  border-radius: prepareMediaVariable(--_ctm-dn-tt-cr-dr-br-rs);
221
228
  }
229
+
230
+ // Icon on top: the rule that separates it from the text runs across
231
+ // the top instead of down the side, and divider position slides
232
+ // along the x-axis.
233
+ // `.wrapper` is carried in the :is() so this outweighs the
234
+ // side-divider rules above rather than tying with them.
235
+ &:is(.wrapper[data-icon-position="top"]>*>*) {
236
+ margin-inline-start: 0;
237
+ margin-block-start: calc(var(--_in_hr-gp, prepareMediaVariable(--_ctm-dn-in-dt-se-in-gp, 0px)) + var(--_ctm-mob-dn-tt-cr-dr-wt,
238
+ var(--_ctm-tab-dn-tt-cr-dr-wt, var(--_ctm-dn-tt-cr-dr-wt, inherit))));
239
+
240
+ &::before {
241
+ top: calc(calc(-1 * var(--_ctm-mob-dn-tt-cr-dr-wt,
242
+ var(--_ctm-tab-dn-tt-cr-dr-wt, var(--_ctm-dn-tt-cr-dr-wt, inherit)))) - var(--_in_hr-gp, prepareMediaVariable(--_ctm-dn-in-dt-se-in-gp, 0px)));
243
+ bottom: auto;
244
+ left: 0;
245
+ right: auto;
246
+ transform: none;
247
+ width: prepareMediaVariable(--_ctm-dn-tt-cr-dr-wh);
248
+ height: prepareMediaVariable(--_ctm-dn-tt-cr-dr-wt);
249
+ }
250
+
251
+ @each $key, $value in map.get(map.get($pos2, vtl), after) {
252
+ &[data-divider-pos="#{$key}"] {
253
+ &::before {
254
+ @each $key1, $value1 in $value {
255
+ #{$key1}: #{$value1};
256
+ }
257
+ }
258
+ }
259
+ }
260
+ }
222
261
  }
223
262
 
224
263
  &>.#{$text} {
@@ -273,7 +273,7 @@ $defaultValues: (
273
273
  border-radius: 6px;
274
274
  border: 1px solid #d0d5dd;
275
275
  padding: 12px;
276
- margin-bottom: 24px;
276
+ // margin-bottom: 24px;
277
277
 
278
278
  .check-icon {
279
279
  font-size: 28px;
@@ -1450,7 +1450,7 @@ $defaultValues: (
1450
1450
  --_ctm-mob-dn-pt-wt-pt-wt-wr-br-rs,
1451
1451
  var(--_ctm-tab-dn-pt-wt-pt-wt-wr-br-rs, var(--_ctm-dn-pt-wt-pt-wt-wr-br-rs))
1452
1452
  );
1453
- margin-bottom: 24px;
1453
+ // margin-bottom: 24px;
1454
1454
  }
1455
1455
 
1456
1456
  .item-card {