@sc-360-v2/storefront-cms-library 0.5.24 → 0.5.26
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/brand.scss +136 -93
- package/dist/breadcrumbs.scss +827 -802
- package/dist/buy-for-tab-container.scss +141 -90
- package/dist/category-groups-product-grid.scss +186 -186
- package/dist/category.scss +67 -24
- package/dist/container.scss +74 -24
- package/dist/grid.scss +169 -119
- package/dist/layouter-item.scss +74 -25
- package/dist/layouter-pro-item.scss +55 -6
- package/dist/layouter-pro.scss +134 -88
- package/dist/layouter.scss +67 -24
- package/dist/light-box-v2.scss +154 -105
- package/dist/line.scss +5 -1
- package/dist/marchandiserSets.scss +107 -60
- package/dist/mega-menu-container.scss +73 -24
- package/dist/mega-menu.scss +25 -3
- package/dist/product-image.scss +1 -1
- package/dist/product.scss +140 -97
- package/dist/productDetails.scss +113 -70
- package/dist/repeater-item.scss +69 -24
- package/dist/repeater.scss +73 -24
- package/dist/section.scss +53 -7
- package/dist/stack.scss +171 -129
- package/dist/tab-container.scss +139 -89
- package/package.json +1 -1
|
@@ -1,90 +1,141 @@
|
|
|
1
|
-
@use "sass:map";
|
|
2
|
-
@use "sass:list";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
// width:
|
|
8
|
-
// width:
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
|
|
12
|
-
//
|
|
13
|
-
|
|
14
|
-
width:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
--
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
--
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
)
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
)
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
@use "sass:list";
|
|
3
|
+
@use "./functions.scss" as *;
|
|
4
|
+
|
|
5
|
+
[data-div-type="element"] {
|
|
6
|
+
&[data-element-type="buyForTabsContainer"] {
|
|
7
|
+
// width: var(--_sf-con-nw-wh);
|
|
8
|
+
// width: var(--_sf-el-wh-st-mx, calc(1% * var(--_ctm-ele-nw-wh-vl, var(--_sf-nw-wh))));
|
|
9
|
+
// width: calc(1% * var(--_ctm-buyfo-ele-nw-wh-vl, auto));
|
|
10
|
+
// width: 100%;
|
|
11
|
+
// height: var(--_ctm-con-lt-ht);
|
|
12
|
+
// margin: var(--_ctm-buyfo-lt-mn, var(--_ctm-lt-mn, --_tst-lt-mn));
|
|
13
|
+
|
|
14
|
+
// width: 100%;
|
|
15
|
+
// background: var(--_ctm-buyfo-dn-bd-cr);
|
|
16
|
+
width: 1200px;
|
|
17
|
+
margin: 0 auto;
|
|
18
|
+
& > div {
|
|
19
|
+
&.wrapper {
|
|
20
|
+
width: 100%;
|
|
21
|
+
height: 100%;
|
|
22
|
+
padding: var(--_ctm-mob-buyfo-lt-pg, var(--_ctm-tab-buyfo-lt-pg, var(--_ctm-buyfo-lt-pg)));
|
|
23
|
+
|
|
24
|
+
&:is([data-background-type="color"] > *).wrapper {
|
|
25
|
+
background-color: #{prepareMediaVariable(--_ctm-buyfo-dn-bd-cr)};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&:is([data-background-type="gradient"] > *).wrapper {
|
|
29
|
+
--_sf-buyfo-gradient-angle: calc(
|
|
30
|
+
#{prepareMediaVariable(--_ctm-buyfo-dn-gt-ae, 90)} * 1deg
|
|
31
|
+
);
|
|
32
|
+
--_sf-buyfo-gradient-start-color: #{prepareMediaVariable(
|
|
33
|
+
--_ctm-buyfo-dn-gt-st-cr,
|
|
34
|
+
transparent
|
|
35
|
+
)};
|
|
36
|
+
--_sf-buyfo-gradient-start-position: calc(
|
|
37
|
+
#{prepareMediaVariable(--_ctm-buyfo-dn-gt-st-pn, 0)} * 1%
|
|
38
|
+
);
|
|
39
|
+
--_sf-buyfo-gradient-end-color: #{prepareMediaVariable(
|
|
40
|
+
--_ctm-buyfo-dn-gt-ed-cr,
|
|
41
|
+
transparent
|
|
42
|
+
)};
|
|
43
|
+
--_sf-buyfo-gradient-end-position: calc(
|
|
44
|
+
#{prepareMediaVariable(--_ctm-buyfo-dn-gt-ed-pn, 100)} * 1%
|
|
45
|
+
);
|
|
46
|
+
--_sf-buyfo-gradient-position: #{prepareMediaVariable(--_ctm-buyfo-dn-gt-pn, center)};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&:is([data-gradient-type="Linear Gradient"] > *).wrapper {
|
|
50
|
+
background-image: linear-gradient(
|
|
51
|
+
var(--_sf-buyfo-gradient-angle),
|
|
52
|
+
var(--_sf-buyfo-gradient-start-color) var(--_sf-buyfo-gradient-start-position),
|
|
53
|
+
var(--_sf-buyfo-gradient-end-color) var(--_sf-buyfo-gradient-end-position)
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&:is([data-gradient-type="Radial Gradient"] > *).wrapper {
|
|
58
|
+
background-image: radial-gradient(
|
|
59
|
+
circle at var(--_sf-buyfo-gradient-position),
|
|
60
|
+
var(--_sf-buyfo-gradient-start-color) var(--_sf-buyfo-gradient-start-position),
|
|
61
|
+
var(--_sf-buyfo-gradient-end-color) var(--_sf-buyfo-gradient-end-position)
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
&:is([data-background-type="image"] > *).wrapper {
|
|
65
|
+
background-image: prepareMediaVariable(--_ctm-buyfo-dn-bd-ie);
|
|
66
|
+
background-attachment: prepareMediaVariable(--_ctm-buyfo-dn-bd-at);
|
|
67
|
+
background-position: prepareMediaVariable(--_ctm-buyfo-dn-bd-pn);
|
|
68
|
+
background-position-y: prepareMediaVariable(--_ctm-buyfo-dn-bd-pn-y);
|
|
69
|
+
background-repeat: prepareMediaVariable(--_ctm-buyfo-dn-bd-rt);
|
|
70
|
+
background-size: prepareMediaVariable(--_ctm-buyfo-dn-bd-se);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// background-color: var(
|
|
74
|
+
// --_ctm-mob-buyfo-dn-bd-cr,
|
|
75
|
+
// var(--_ctm-tab-buyfo-dn-bd-cr, var(--_ctm-buyfo-dn-bd-cr))
|
|
76
|
+
// );
|
|
77
|
+
// background-image: var(
|
|
78
|
+
// --_ctm-mob-buyfo-dn-bd-ie,
|
|
79
|
+
// var(--_ctm-tab-buyfo-dn-bd-ie, var(--_ctm-buyfo-dn-bd-ie))
|
|
80
|
+
// );
|
|
81
|
+
// background-attachment: var(
|
|
82
|
+
// --_ctm-mob-buyfo-dn-bd-at,
|
|
83
|
+
// var(--_ctm-tab-buyfo-dn-bd-at, var(--_ctm-buyfo-dn-bd-at))
|
|
84
|
+
// );
|
|
85
|
+
// background-position: var(
|
|
86
|
+
// --_ctm-mob-buyfo-dn-bd-pn,
|
|
87
|
+
// var(--_ctm-tab-buyfo-dn-bd-pn, var(--_ctm-buyfo-dn-bd-pn))
|
|
88
|
+
// );
|
|
89
|
+
// background-repeat: var(
|
|
90
|
+
// --_ctm-mob-buyfo-dn-bd-rt,
|
|
91
|
+
// var(--_ctm-tab-buyfo-dn-bd-rt, var(--_ctm-buyfo-dn-bd-rt))
|
|
92
|
+
// );
|
|
93
|
+
// background-size: var(
|
|
94
|
+
// --_ctm-mob-buyfo-dn-bd-se,
|
|
95
|
+
// var(--_ctm-tab-buyfo-dn-bd-se, var(--_ctm-buyfo-dn-bd-se))
|
|
96
|
+
// );
|
|
97
|
+
border-radius: var(
|
|
98
|
+
--_ctm-mob-buyfo-dn-br-rs,
|
|
99
|
+
var(--_ctm-tab-buyfo-dn-br-rs, var(--_ctm-buyfo-dn-br-rs))
|
|
100
|
+
);
|
|
101
|
+
border-color: var(
|
|
102
|
+
--_ctm-mob-buyfo-dn-br-cr,
|
|
103
|
+
var(--_ctm-tab-buyfo-dn-br-cr, var(--_ctm-buyfo-dn-br-cr))
|
|
104
|
+
);
|
|
105
|
+
border-style: var(
|
|
106
|
+
--_ctm-mob-buyfo-dn-br-se,
|
|
107
|
+
var(--_ctm-tab-buyfo-dn-br-se, var(--_ctm-buyfo-dn-br-se))
|
|
108
|
+
);
|
|
109
|
+
border-width: var(
|
|
110
|
+
--_ctm-mob-buyfo-dn-br-wh,
|
|
111
|
+
var(--_ctm-tab-buyfo-dn-br-wh, var(--_ctm-buyfo-dn-br-wh))
|
|
112
|
+
);
|
|
113
|
+
box-shadow: var(
|
|
114
|
+
--_hover-show-shadow,
|
|
115
|
+
var(
|
|
116
|
+
--_sf-hr-bx-sw,
|
|
117
|
+
var(
|
|
118
|
+
--_show-shadow,
|
|
119
|
+
var(
|
|
120
|
+
--_ctm-mob-dn-dt-se-sw-ae,
|
|
121
|
+
var(--_ctm-tab-dn-dt-se-sw-ae, var(--_ctm-dn-dt-se-sw-ae))
|
|
122
|
+
)
|
|
123
|
+
var(
|
|
124
|
+
--_ctm-mob-dn-dt-se-sw-br,
|
|
125
|
+
var(--_ctm-tab-dn-dt-se-sw-br, var(--_ctm-dn-dt-se-sw-br))
|
|
126
|
+
)
|
|
127
|
+
var(
|
|
128
|
+
--_ctm-mob-dn-dt-se-sw-sd,
|
|
129
|
+
var(--_ctm-tab-dn-dt-se-sw-sd, var(--_ctm-dn-dt-se-sw-sd))
|
|
130
|
+
)
|
|
131
|
+
var(
|
|
132
|
+
--_ctm-mob-dn-dt-se-sw-cr,
|
|
133
|
+
var(--_ctm-tab-dn-dt-se-sw-cr, var(--_ctm-dn-dt-se-sw-cr))
|
|
134
|
+
)
|
|
135
|
+
)
|
|
136
|
+
)
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -1,186 +1,186 @@
|
|
|
1
|
-
@use "./functions.scss" as *;
|
|
2
|
-
@use "./repeater-embla-controls.scss" as *;
|
|
3
|
-
|
|
4
|
-
// Category Groups product grid — display styles (Grid / Cards / Slider) ported
|
|
5
|
-
// (light) from the Repeater, rebound to the productGridDesign.layout CSS-variable
|
|
6
|
-
// paths (--_ctm-catego-dn-pt-gd-dn-lt-*). Items-per-row / min-column-width /
|
|
7
|
-
// gaps are responsive (mob/tab/desktop var fallback). The container box
|
|
8
|
-
// (padding + fill/border/radius/shadow) stays on .cg_product_grid in
|
|
9
|
-
// category-groups-element.scss. @imported there within the categoryGroups scope.
|
|
10
|
-
//
|
|
11
|
-
// DOM: .cg_product_grid (root, gets grd|crds|sld + embla + data-control-type)
|
|
12
|
-
// > .cg_product_grid_wrapper (gets embla__container in slider mode)
|
|
13
|
-
// > .cg_product_card (grid / cards)
|
|
14
|
-
// > .embla__slide > .cg_product_card (slider)
|
|
15
|
-
// > slider arrows / dots (slider mode)
|
|
16
|
-
.cg_product_grid {
|
|
17
|
-
// Slider-control intermediate vars consumed by the embla-controls mixin.
|
|
18
|
-
--_sf-ic-sz-nn: var(
|
|
19
|
-
--_ctm-mob-catego-dn-pt-gd-dn-lt-aw-in-se,
|
|
20
|
-
var(--_ctm-tab-catego-dn-pt-gd-dn-lt-aw-in-se, var(--_ctm-catego-dn-pt-gd-dn-lt-aw-in-se, 40px))
|
|
21
|
-
);
|
|
22
|
-
--_sf-ed-vl-sz: var(
|
|
23
|
-
--_ctm-mob-catego-dn-pt-gd-dn-lt-dt-se,
|
|
24
|
-
var(--_ctm-tab-catego-dn-pt-gd-dn-lt-dt-se, var(--_ctm-catego-dn-pt-gd-dn-lt-dt-se, 10px))
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
// ---- Grid mode: auto-fit columns by min column width ----
|
|
28
|
-
&.grd {
|
|
29
|
-
& > .cg_product_grid_wrapper {
|
|
30
|
-
width: 100%;
|
|
31
|
-
display: grid;
|
|
32
|
-
grid-template-columns: repeat(
|
|
33
|
-
auto-fit,
|
|
34
|
-
minmax(
|
|
35
|
-
var(
|
|
36
|
-
--_ctm-mob-catego-dn-pt-gd-dn-lt-mn-cn-wh,
|
|
37
|
-
var(
|
|
38
|
-
--_ctm-tab-catego-dn-pt-gd-dn-lt-mn-cn-wh,
|
|
39
|
-
var(--_ctm-catego-dn-pt-gd-dn-lt-mn-cn-wh, 200px)
|
|
40
|
-
)
|
|
41
|
-
),
|
|
42
|
-
1fr
|
|
43
|
-
)
|
|
44
|
-
);
|
|
45
|
-
grid-auto-rows: minmax(
|
|
46
|
-
var(
|
|
47
|
-
--_ctm-mob-catego-dn-pt-gd-dn-lt-mn-rw-ht,
|
|
48
|
-
var(
|
|
49
|
-
--_ctm-tab-catego-dn-pt-gd-dn-lt-mn-rw-ht,
|
|
50
|
-
var(--_ctm-catego-dn-pt-gd-dn-lt-mn-rw-ht, auto)
|
|
51
|
-
)
|
|
52
|
-
),
|
|
53
|
-
auto
|
|
54
|
-
);
|
|
55
|
-
column-gap: #{prepareMediaVariable(--_ctm-catego-dn-pt-gd-dn-lt-cn-gp, 24px)};
|
|
56
|
-
row-gap: #{prepareMediaVariable(--_ctm-catego-dn-pt-gd-dn-lt-rw-gp, 24px)};
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// ---- Cards mode: fixed items per row (flex calc) ----
|
|
61
|
-
&.crds {
|
|
62
|
-
& > .cg_product_grid_wrapper {
|
|
63
|
-
display: flex;
|
|
64
|
-
flex-wrap: wrap;
|
|
65
|
-
width: 100%;
|
|
66
|
-
column-gap: #{prepareMediaVariable(--_ctm-catego-dn-pt-gd-dn-lt-cn-gp, 24px)};
|
|
67
|
-
row-gap: #{prepareMediaVariable(--_ctm-catego-dn-pt-gd-dn-lt-rw-gp, 24px)};
|
|
68
|
-
& > .cg_product_card {
|
|
69
|
-
--_col-count: var(
|
|
70
|
-
--_ctm-mob-catego-dn-pt-gd-dn-lt-st-is-pr-rw,
|
|
71
|
-
var(
|
|
72
|
-
--_ctm-tab-catego-dn-pt-gd-dn-lt-st-is-pr-rw,
|
|
73
|
-
var(--_ctm-catego-dn-pt-gd-dn-lt-st-is-pr-rw, 3)
|
|
74
|
-
)
|
|
75
|
-
);
|
|
76
|
-
--_col-gap: #{prepareMediaVariable(--_ctm-catego-dn-pt-gd-dn-lt-cn-gp, 0px)};
|
|
77
|
-
width: calc(
|
|
78
|
-
(100% / var(--_col-count)) -
|
|
79
|
-
(((var(--_col-count) - 1) * var(--_col-gap)) / (var(--_col-count)))
|
|
80
|
-
);
|
|
81
|
-
flex: 0 0
|
|
82
|
-
calc(
|
|
83
|
-
(100% / var(--_col-count)) -
|
|
84
|
-
(((var(--_col-count) - 1) * var(--_col-gap)) / (var(--_col-count)))
|
|
85
|
-
);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
// ---- Slider mode (Embla) ----
|
|
91
|
-
&.sld {
|
|
92
|
-
position: relative;
|
|
93
|
-
overflow: clip;
|
|
94
|
-
--_sf-sl-ct-ic-dt-at-cl: var(
|
|
95
|
-
--_ctm-mob-catego-dn-pt-gd-dn-lt-cl-ae-cr,
|
|
96
|
-
var(--_ctm-tab-catego-dn-pt-gd-dn-lt-cl-ae-cr, var(--_ctm-catego-dn-pt-gd-dn-lt-cl-ae-cr))
|
|
97
|
-
);
|
|
98
|
-
|
|
99
|
-
@for $i from 1 through 3 {
|
|
100
|
-
&:is([data-control-type="#{$i}"]) {
|
|
101
|
-
@if ($i == 3) {
|
|
102
|
-
overflow-y: visible;
|
|
103
|
-
}
|
|
104
|
-
@include CMSRepeaterEmblaControlStyles($i);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
// Template 3: place the arrows/dots ABOVE the product list (not over the
|
|
109
|
-
// images). bottom:100% puts the control's bottom edge at the grid's top
|
|
110
|
-
// edge; +8px adds a small gap. overflow-y:visible (set above) lets it
|
|
111
|
-
// show above the grid. (Repeater gets this from a saved template.)
|
|
112
|
-
&:is([data-control-type="3"]) {
|
|
113
|
-
--_sf-rp-ct-t3-top-vl: auto;
|
|
114
|
-
--_sf-rp-ct-t3-bottom-vl: calc(100% + 8px);
|
|
115
|
-
--_sf-rp-ct-t3-right-vl: 0px;
|
|
116
|
-
--_sf-rp-ct-t3-left-vl: auto;
|
|
117
|
-
--_sf-rp-ct-t3-transform-vl: none;
|
|
118
|
-
|
|
119
|
-
// Restyle template-3 pagination from the connected gray bar into
|
|
120
|
-
// separated circular dots + a capsule active indicator.
|
|
121
|
-
.pagination__v1 {
|
|
122
|
-
gap: 6px;
|
|
123
|
-
}
|
|
124
|
-
.pagination__v1 > button.embla__dot {
|
|
125
|
-
width: var(--_sf-ed-vl-sz, 10px);
|
|
126
|
-
height: var(--_sf-ed-vl-sz, 10px);
|
|
127
|
-
border-radius: 50%;
|
|
128
|
-
background: #d6d6d6;
|
|
129
|
-
}
|
|
130
|
-
.pagination__v1 > button.embla__dot.embla__dot--selected {
|
|
131
|
-
width: max(calc(var(--_sf-ed-vl-sz, 10px) * 2), 20px);
|
|
132
|
-
border-radius: 999px;
|
|
133
|
-
background: var(--_sf-sl-ct-ic-dt-at-cl, #7c3aed);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
// Pagination dots: never compress. With many pages the strip scrolls
|
|
138
|
-
// horizontally (scrollbar hidden) instead of squishing the dots.
|
|
139
|
-
.pagination__v1 {
|
|
140
|
-
flex-wrap: nowrap;
|
|
141
|
-
overflow-x: auto;
|
|
142
|
-
overflow-y: hidden;
|
|
143
|
-
scrollbar-width: none;
|
|
144
|
-
&::-webkit-scrollbar {
|
|
145
|
-
display: none;
|
|
146
|
-
}
|
|
147
|
-
& > button.embla__dot {
|
|
148
|
-
flex-shrink: 0;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
& > .cg_product_grid_wrapper.embla__container {
|
|
153
|
-
display: flex;
|
|
154
|
-
width: 100%;
|
|
155
|
-
min-height: 100px;
|
|
156
|
-
gap: #{prepareMediaVariable(--_ctm-catego-dn-pt-gd-dn-lt-im-gp, 0px)};
|
|
157
|
-
--_embla-slide-space: var(
|
|
158
|
-
--_ctm-mob-catego-dn-pt-gd-dn-lt-im-gp,
|
|
159
|
-
var(--_ctm-tab-catego-dn-pt-gd-dn-lt-im-gp, var(--_ctm-catego-dn-pt-gd-dn-lt-im-gp, 0px))
|
|
160
|
-
);
|
|
161
|
-
--_embla-col-count: var(
|
|
162
|
-
--_ctm-mob-catego-dn-pt-gd-dn-lt-st-is-pr-se,
|
|
163
|
-
var(
|
|
164
|
-
--_ctm-tab-catego-dn-pt-gd-dn-lt-st-is-pr-se,
|
|
165
|
-
var(--_ctm-catego-dn-pt-gd-dn-lt-st-is-pr-se, 3)
|
|
166
|
-
)
|
|
167
|
-
);
|
|
168
|
-
& > .embla__slide {
|
|
169
|
-
--_sf-cl-vl: calc(
|
|
170
|
-
(100% / var(--_embla-col-count, 3)) -
|
|
171
|
-
(
|
|
172
|
-
((var(--_embla-col-count, 3) - 1) * (var(--_embla-slide-space, 10px))) /
|
|
173
|
-
(var(--_embla-col-count, 3))
|
|
174
|
-
)
|
|
175
|
-
);
|
|
176
|
-
flex: 0 0 var(--_sf-cl-vl);
|
|
177
|
-
width: var(--_sf-cl-vl);
|
|
178
|
-
grid-template-rows: minmax(50px, auto);
|
|
179
|
-
grid-template-columns: minmax(0px, 1fr);
|
|
180
|
-
img {
|
|
181
|
-
width: 100%;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
1
|
+
@use "./functions.scss" as *;
|
|
2
|
+
@use "./repeater-embla-controls.scss" as *;
|
|
3
|
+
|
|
4
|
+
// Category Groups product grid — display styles (Grid / Cards / Slider) ported
|
|
5
|
+
// (light) from the Repeater, rebound to the productGridDesign.layout CSS-variable
|
|
6
|
+
// paths (--_ctm-catego-dn-pt-gd-dn-lt-*). Items-per-row / min-column-width /
|
|
7
|
+
// gaps are responsive (mob/tab/desktop var fallback). The container box
|
|
8
|
+
// (padding + fill/border/radius/shadow) stays on .cg_product_grid in
|
|
9
|
+
// category-groups-element.scss. @imported there within the categoryGroups scope.
|
|
10
|
+
//
|
|
11
|
+
// DOM: .cg_product_grid (root, gets grd|crds|sld + embla + data-control-type)
|
|
12
|
+
// > .cg_product_grid_wrapper (gets embla__container in slider mode)
|
|
13
|
+
// > .cg_product_card (grid / cards)
|
|
14
|
+
// > .embla__slide > .cg_product_card (slider)
|
|
15
|
+
// > slider arrows / dots (slider mode)
|
|
16
|
+
.cg_product_grid {
|
|
17
|
+
// Slider-control intermediate vars consumed by the embla-controls mixin.
|
|
18
|
+
--_sf-ic-sz-nn: var(
|
|
19
|
+
--_ctm-mob-catego-dn-pt-gd-dn-lt-aw-in-se,
|
|
20
|
+
var(--_ctm-tab-catego-dn-pt-gd-dn-lt-aw-in-se, var(--_ctm-catego-dn-pt-gd-dn-lt-aw-in-se, 40px))
|
|
21
|
+
);
|
|
22
|
+
--_sf-ed-vl-sz: var(
|
|
23
|
+
--_ctm-mob-catego-dn-pt-gd-dn-lt-dt-se,
|
|
24
|
+
var(--_ctm-tab-catego-dn-pt-gd-dn-lt-dt-se, var(--_ctm-catego-dn-pt-gd-dn-lt-dt-se, 10px))
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
// ---- Grid mode: auto-fit columns by min column width ----
|
|
28
|
+
&.grd {
|
|
29
|
+
& > .cg_product_grid_wrapper {
|
|
30
|
+
width: 100%;
|
|
31
|
+
display: grid;
|
|
32
|
+
grid-template-columns: repeat(
|
|
33
|
+
auto-fit,
|
|
34
|
+
minmax(
|
|
35
|
+
var(
|
|
36
|
+
--_ctm-mob-catego-dn-pt-gd-dn-lt-mn-cn-wh,
|
|
37
|
+
var(
|
|
38
|
+
--_ctm-tab-catego-dn-pt-gd-dn-lt-mn-cn-wh,
|
|
39
|
+
var(--_ctm-catego-dn-pt-gd-dn-lt-mn-cn-wh, 200px)
|
|
40
|
+
)
|
|
41
|
+
),
|
|
42
|
+
1fr
|
|
43
|
+
)
|
|
44
|
+
);
|
|
45
|
+
grid-auto-rows: minmax(
|
|
46
|
+
var(
|
|
47
|
+
--_ctm-mob-catego-dn-pt-gd-dn-lt-mn-rw-ht,
|
|
48
|
+
var(
|
|
49
|
+
--_ctm-tab-catego-dn-pt-gd-dn-lt-mn-rw-ht,
|
|
50
|
+
var(--_ctm-catego-dn-pt-gd-dn-lt-mn-rw-ht, auto)
|
|
51
|
+
)
|
|
52
|
+
),
|
|
53
|
+
auto
|
|
54
|
+
);
|
|
55
|
+
column-gap: #{prepareMediaVariable(--_ctm-catego-dn-pt-gd-dn-lt-cn-gp, 24px)};
|
|
56
|
+
row-gap: #{prepareMediaVariable(--_ctm-catego-dn-pt-gd-dn-lt-rw-gp, 24px)};
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// ---- Cards mode: fixed items per row (flex calc) ----
|
|
61
|
+
&.crds {
|
|
62
|
+
& > .cg_product_grid_wrapper {
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-wrap: wrap;
|
|
65
|
+
width: 100%;
|
|
66
|
+
column-gap: #{prepareMediaVariable(--_ctm-catego-dn-pt-gd-dn-lt-cn-gp, 24px)};
|
|
67
|
+
row-gap: #{prepareMediaVariable(--_ctm-catego-dn-pt-gd-dn-lt-rw-gp, 24px)};
|
|
68
|
+
& > .cg_product_card {
|
|
69
|
+
--_col-count: var(
|
|
70
|
+
--_ctm-mob-catego-dn-pt-gd-dn-lt-st-is-pr-rw,
|
|
71
|
+
var(
|
|
72
|
+
--_ctm-tab-catego-dn-pt-gd-dn-lt-st-is-pr-rw,
|
|
73
|
+
var(--_ctm-catego-dn-pt-gd-dn-lt-st-is-pr-rw, 3)
|
|
74
|
+
)
|
|
75
|
+
);
|
|
76
|
+
--_col-gap: #{prepareMediaVariable(--_ctm-catego-dn-pt-gd-dn-lt-cn-gp, 0px)};
|
|
77
|
+
width: calc(
|
|
78
|
+
(100% / var(--_col-count)) -
|
|
79
|
+
(((var(--_col-count) - 1) * var(--_col-gap)) / (var(--_col-count)))
|
|
80
|
+
);
|
|
81
|
+
flex: 0 0
|
|
82
|
+
calc(
|
|
83
|
+
(100% / var(--_col-count)) -
|
|
84
|
+
(((var(--_col-count) - 1) * var(--_col-gap)) / (var(--_col-count)))
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// ---- Slider mode (Embla) ----
|
|
91
|
+
&.sld {
|
|
92
|
+
position: relative;
|
|
93
|
+
overflow: clip;
|
|
94
|
+
--_sf-sl-ct-ic-dt-at-cl: var(
|
|
95
|
+
--_ctm-mob-catego-dn-pt-gd-dn-lt-cl-ae-cr,
|
|
96
|
+
var(--_ctm-tab-catego-dn-pt-gd-dn-lt-cl-ae-cr, var(--_ctm-catego-dn-pt-gd-dn-lt-cl-ae-cr))
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
@for $i from 1 through 3 {
|
|
100
|
+
&:is([data-control-type="#{$i}"]) {
|
|
101
|
+
@if ($i == 3) {
|
|
102
|
+
overflow-y: visible;
|
|
103
|
+
}
|
|
104
|
+
@include CMSRepeaterEmblaControlStyles($i);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Template 3: place the arrows/dots ABOVE the product list (not over the
|
|
109
|
+
// images). bottom:100% puts the control's bottom edge at the grid's top
|
|
110
|
+
// edge; +8px adds a small gap. overflow-y:visible (set above) lets it
|
|
111
|
+
// show above the grid. (Repeater gets this from a saved template.)
|
|
112
|
+
&:is([data-control-type="3"]) {
|
|
113
|
+
--_sf-rp-ct-t3-top-vl: auto;
|
|
114
|
+
--_sf-rp-ct-t3-bottom-vl: calc(100% + 8px);
|
|
115
|
+
--_sf-rp-ct-t3-right-vl: 0px;
|
|
116
|
+
--_sf-rp-ct-t3-left-vl: auto;
|
|
117
|
+
--_sf-rp-ct-t3-transform-vl: none;
|
|
118
|
+
|
|
119
|
+
// Restyle template-3 pagination from the connected gray bar into
|
|
120
|
+
// separated circular dots + a capsule active indicator.
|
|
121
|
+
.pagination__v1 {
|
|
122
|
+
gap: 6px;
|
|
123
|
+
}
|
|
124
|
+
.pagination__v1 > button.embla__dot {
|
|
125
|
+
width: var(--_sf-ed-vl-sz, 10px);
|
|
126
|
+
height: var(--_sf-ed-vl-sz, 10px);
|
|
127
|
+
border-radius: 50%;
|
|
128
|
+
background: #d6d6d6;
|
|
129
|
+
}
|
|
130
|
+
.pagination__v1 > button.embla__dot.embla__dot--selected {
|
|
131
|
+
width: max(calc(var(--_sf-ed-vl-sz, 10px) * 2), 20px);
|
|
132
|
+
border-radius: 999px;
|
|
133
|
+
background: var(--_sf-sl-ct-ic-dt-at-cl, #7c3aed);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// Pagination dots: never compress. With many pages the strip scrolls
|
|
138
|
+
// horizontally (scrollbar hidden) instead of squishing the dots.
|
|
139
|
+
.pagination__v1 {
|
|
140
|
+
flex-wrap: nowrap;
|
|
141
|
+
overflow-x: auto;
|
|
142
|
+
overflow-y: hidden;
|
|
143
|
+
scrollbar-width: none;
|
|
144
|
+
&::-webkit-scrollbar {
|
|
145
|
+
display: none;
|
|
146
|
+
}
|
|
147
|
+
& > button.embla__dot {
|
|
148
|
+
flex-shrink: 0;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
& > .cg_product_grid_wrapper.embla__container {
|
|
153
|
+
display: flex;
|
|
154
|
+
width: 100%;
|
|
155
|
+
min-height: 100px;
|
|
156
|
+
gap: #{prepareMediaVariable(--_ctm-catego-dn-pt-gd-dn-lt-im-gp, 0px)};
|
|
157
|
+
--_embla-slide-space: var(
|
|
158
|
+
--_ctm-mob-catego-dn-pt-gd-dn-lt-im-gp,
|
|
159
|
+
var(--_ctm-tab-catego-dn-pt-gd-dn-lt-im-gp, var(--_ctm-catego-dn-pt-gd-dn-lt-im-gp, 0px))
|
|
160
|
+
);
|
|
161
|
+
--_embla-col-count: var(
|
|
162
|
+
--_ctm-mob-catego-dn-pt-gd-dn-lt-st-is-pr-se,
|
|
163
|
+
var(
|
|
164
|
+
--_ctm-tab-catego-dn-pt-gd-dn-lt-st-is-pr-se,
|
|
165
|
+
var(--_ctm-catego-dn-pt-gd-dn-lt-st-is-pr-se, 3)
|
|
166
|
+
)
|
|
167
|
+
);
|
|
168
|
+
& > .embla__slide {
|
|
169
|
+
--_sf-cl-vl: calc(
|
|
170
|
+
(100% / var(--_embla-col-count, 3)) -
|
|
171
|
+
(
|
|
172
|
+
((var(--_embla-col-count, 3) - 1) * (var(--_embla-slide-space, 10px))) /
|
|
173
|
+
(var(--_embla-col-count, 3))
|
|
174
|
+
)
|
|
175
|
+
);
|
|
176
|
+
flex: 0 0 var(--_sf-cl-vl);
|
|
177
|
+
width: var(--_sf-cl-vl);
|
|
178
|
+
grid-template-rows: minmax(50px, auto);
|
|
179
|
+
grid-template-columns: minmax(0px, 1fr);
|
|
180
|
+
img {
|
|
181
|
+
width: 100%;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|