@andreyshpigunov/x 0.4.4 → 0.5.1
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/assets/css/app.css +1 -1
- package/assets/js/app.js +1 -1
- package/cheatsheet.html +18 -14
- package/dist/x.css +1 -1
- package/dist/x.js +1 -1
- package/index.html +102 -102
- package/package.json +1 -1
- package/src/components/x/animate.js +1 -1
- package/src/components/x/buttons.css +191 -187
- package/src/components/x/colors.css +57 -35
- package/src/components/x/dropdown.css +127 -123
- package/src/components/x/dropdown.js +19 -19
- package/src/components/x/flex.css +141 -137
- package/src/components/x/flow.css +35 -31
- package/src/components/x/form.css +97 -93
- package/src/components/x/grid.css +99 -94
- package/src/components/x/helpers.css +915 -912
- package/src/components/x/icons.css +40 -36
- package/src/components/x/lib.js +4 -4
- package/src/components/x/links.css +63 -59
- package/src/components/x/modal.css +218 -214
- package/src/components/x/modal.js +23 -23
- package/src/components/x/reset.css +166 -162
- package/src/components/x/scroll.css +77 -71
- package/src/components/x/sheets.css +6 -2
- package/src/components/x/slider.css +74 -70
- package/src/components/x/space.css +30 -26
- package/src/components/x/sticky.css +18 -14
- package/src/components/x/sticky.js +5 -5
- package/src/components/x/typo.css +208 -205
- package/src/css/x.css +20 -17
|
@@ -45,176 +45,180 @@ All right reserved.
|
|
|
45
45
|
--space-10: 6.4rem;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
|
50
|
-
a, abbr, acronym, address, big, cite, code,
|
|
51
|
-
del, dfn, em, img, ins, kbd, q, s, samp,
|
|
52
|
-
small, strike, strong, sub, sup, tt, var,
|
|
53
|
-
b, u, i, center, dl, dt, dd, ol, ul, li,
|
|
54
|
-
fieldset, form, label, legend,
|
|
55
|
-
table, caption, tbody, tfoot, thead, tr, th, td,
|
|
56
|
-
article, aside, canvas, details, embed,
|
|
57
|
-
figure, figcaption, footer, header, hgroup,
|
|
58
|
-
menu, nav, output, ruby, section, summary,
|
|
59
|
-
time, mark, audio, video {
|
|
60
|
-
margin: 0;
|
|
61
|
-
padding: 0;
|
|
62
|
-
border: 0;
|
|
63
|
-
font: inherit;
|
|
64
|
-
vertical-align: baseline;
|
|
65
|
-
box-sizing: border-box;
|
|
66
|
-
}
|
|
67
|
-
:before,
|
|
68
|
-
:after {
|
|
69
|
-
box-sizing: border-box;
|
|
70
|
-
}
|
|
71
|
-
html,
|
|
72
|
-
body {
|
|
73
|
-
min-width: 320px;
|
|
74
|
-
min-height: 100vh;
|
|
75
|
-
max-height: none;
|
|
76
|
-
}
|
|
77
|
-
html {
|
|
78
|
-
line-height: var(--line-height);
|
|
79
|
-
font-family: var(--font-family);
|
|
80
|
-
font-size: calc(var(--font-size-base) * var(--font-scale));
|
|
81
|
-
background-color: var(--background-color);
|
|
82
|
-
font-synthesis: initial;
|
|
83
|
-
text-rendering: optimizeLegibility;
|
|
84
|
-
-webkit-text-size-adjust: 100%;
|
|
85
|
-
-webkit-tap-highlight-color: #00000000;
|
|
86
|
-
font-feature-settings: 'liga', 'kern';
|
|
87
|
-
color: var(--font-color);
|
|
88
|
-
scroll-behavior: smooth;
|
|
89
|
-
scroll-padding-top: 10vh;
|
|
90
|
-
scroll-padding-bottom: 10vh;
|
|
91
|
-
|
|
92
|
-
/* !- Scaling */
|
|
93
|
-
&.scale5n { --font-scale: 0.75 }
|
|
94
|
-
&.scale4n { --font-scale: 0.80 }
|
|
95
|
-
&.scale3n { --font-scale: 0.85 }
|
|
96
|
-
&.scale2n { --font-scale: 0.90 }
|
|
97
|
-
&.scale1n { --font-scale: 0.95 }
|
|
98
|
-
&.scale0 { --font-scale: 1.00 }
|
|
99
|
-
&.scale1 { --font-scale: 1.05 }
|
|
100
|
-
&.scale2 { --font-scale: 1.10 }
|
|
101
|
-
&.scale3 { --font-scale: 1.15 }
|
|
102
|
-
&.scale4 { --font-scale: 1.20 }
|
|
103
|
-
&.scale5 { --font-scale: 1.25 }
|
|
48
|
+
@layer reset {
|
|
104
49
|
|
|
105
|
-
|
|
106
|
-
|
|
50
|
+
html, body, main, div, span, object, iframe,
|
|
51
|
+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
|
52
|
+
a, abbr, acronym, address, big, cite, code,
|
|
53
|
+
del, dfn, em, img, ins, kbd, q, s, samp,
|
|
54
|
+
small, strike, strong, sub, sup, tt, var,
|
|
55
|
+
b, u, i, center, dl, dt, dd, ol, ul, li,
|
|
56
|
+
fieldset, form, label, legend,
|
|
57
|
+
table, caption, tbody, tfoot, thead, tr, th, td,
|
|
58
|
+
article, aside, canvas, details, embed,
|
|
59
|
+
figure, figcaption, footer, header, hgroup,
|
|
60
|
+
menu, nav, output, ruby, section, summary,
|
|
61
|
+
time, mark, audio, video {
|
|
62
|
+
margin: 0;
|
|
63
|
+
padding: 0;
|
|
64
|
+
border: 0;
|
|
65
|
+
font: inherit;
|
|
66
|
+
vertical-align: baseline;
|
|
67
|
+
box-sizing: border-box;
|
|
107
68
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
scroll-behavior: auto;
|
|
69
|
+
:before,
|
|
70
|
+
:after {
|
|
71
|
+
box-sizing: border-box;
|
|
112
72
|
}
|
|
113
|
-
|
|
114
|
-
body {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
73
|
+
html,
|
|
74
|
+
body {
|
|
75
|
+
min-width: 320px;
|
|
76
|
+
min-height: 100vh;
|
|
77
|
+
max-height: none;
|
|
78
|
+
}
|
|
79
|
+
html {
|
|
80
|
+
line-height: var(--line-height);
|
|
81
|
+
font-family: var(--font-family);
|
|
82
|
+
font-size: calc(var(--font-size-base) * var(--font-scale));
|
|
83
|
+
background-color: var(--background-color);
|
|
84
|
+
font-synthesis: initial;
|
|
85
|
+
text-rendering: optimizeLegibility;
|
|
86
|
+
-webkit-text-size-adjust: 100%;
|
|
87
|
+
-webkit-tap-highlight-color: #00000000;
|
|
88
|
+
font-feature-settings: 'liga', 'kern';
|
|
89
|
+
color: var(--font-color);
|
|
90
|
+
scroll-behavior: smooth;
|
|
91
|
+
scroll-padding-top: 10vh;
|
|
92
|
+
scroll-padding-bottom: 10vh;
|
|
119
93
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
94
|
+
/* !- Scaling */
|
|
95
|
+
&.scale5n { --font-scale: 0.75 }
|
|
96
|
+
&.scale4n { --font-scale: 0.80 }
|
|
97
|
+
&.scale3n { --font-scale: 0.85 }
|
|
98
|
+
&.scale2n { --font-scale: 0.90 }
|
|
99
|
+
&.scale1n { --font-scale: 0.95 }
|
|
100
|
+
&.scale0 { --font-scale: 1.00 }
|
|
101
|
+
&.scale1 { --font-scale: 1.05 }
|
|
102
|
+
&.scale2 { --font-scale: 1.10 }
|
|
103
|
+
&.scale3 { --font-scale: 1.15 }
|
|
104
|
+
&.scale4 { --font-scale: 1.20 }
|
|
105
|
+
&.scale5 { --font-scale: 1.25 }
|
|
106
|
+
|
|
107
|
+
&.no-transitions * {
|
|
108
|
+
transition: none !important;
|
|
109
|
+
}
|
|
123
110
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
& tr td,
|
|
130
|
-
& tr th {
|
|
131
|
-
vertical-align: top;
|
|
132
|
-
text-align: left;
|
|
111
|
+
@media (prefers-reduced-motion: reduce) {
|
|
112
|
+
html {
|
|
113
|
+
scroll-behavior: auto;
|
|
114
|
+
}
|
|
133
115
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
line-height: var(--line-height);
|
|
149
|
-
}
|
|
150
|
-
a, button, .button,
|
|
151
|
-
input[type=button] {
|
|
152
|
-
touch-action: manipulation;
|
|
153
|
-
}
|
|
154
|
-
:focus {
|
|
155
|
-
outline: 0;
|
|
156
|
-
}
|
|
157
|
-
:focus-visible {
|
|
158
|
-
outline: 2px solid currentColor;
|
|
159
|
-
outline-offset: 2px;
|
|
160
|
-
}
|
|
161
|
-
[hidden] {
|
|
162
|
-
display: none !important;
|
|
163
|
-
}
|
|
164
|
-
hr {
|
|
165
|
-
display: block;
|
|
166
|
-
height: .1rem;
|
|
167
|
-
margin: 1.6rem 0;
|
|
168
|
-
border: none;
|
|
169
|
-
background-color: #88888822;
|
|
170
|
-
}
|
|
171
|
-
sup, sub {
|
|
172
|
-
position: relative;
|
|
173
|
-
top: -.8em;
|
|
174
|
-
font-size: 1.1em;
|
|
175
|
-
}
|
|
176
|
-
sub {
|
|
177
|
-
top: auto;
|
|
178
|
-
bottom: -.8em;
|
|
179
|
-
}
|
|
180
|
-
mark {
|
|
181
|
-
margin: 0 -.4em;
|
|
182
|
-
padding: 0 .4em;
|
|
183
|
-
background-color: #fe0;
|
|
184
|
-
}
|
|
185
|
-
code, kbd, samp {
|
|
186
|
-
font-family: var(--font-family-mono);
|
|
187
|
-
}
|
|
188
|
-
strong, b {
|
|
189
|
-
font-weight: 700;
|
|
190
|
-
}
|
|
191
|
-
em, i, var, dfn, cite {
|
|
192
|
-
font-style: italic;
|
|
193
|
-
}
|
|
194
|
-
ins, u {
|
|
195
|
-
text-decoration: underline;
|
|
196
|
-
}
|
|
197
|
-
del, s {
|
|
198
|
-
text-decoration: line-through;
|
|
199
|
-
}
|
|
200
|
-
img {
|
|
201
|
-
display: block;
|
|
202
|
-
width: auto;
|
|
203
|
-
height: auto;
|
|
204
|
-
max-width: 100%;
|
|
205
|
-
}
|
|
206
|
-
ul.reset,
|
|
207
|
-
ol.reset {
|
|
208
|
-
margin: 0;
|
|
209
|
-
padding: 0;
|
|
210
|
-
list-style: none;
|
|
116
|
+
body {
|
|
117
|
+
font-size: var(--font-size);
|
|
118
|
+
}
|
|
119
|
+
blockquote, q {
|
|
120
|
+
quotes: none;
|
|
121
|
+
|
|
122
|
+
&:before,
|
|
123
|
+
&:after {
|
|
124
|
+
content: none;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
table {
|
|
128
|
+
border-collapse: collapse;
|
|
129
|
+
border-spacing: 0;
|
|
211
130
|
|
|
212
|
-
|
|
131
|
+
& tr td,
|
|
132
|
+
& tr th {
|
|
133
|
+
vertical-align: top;
|
|
134
|
+
text-align: left;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
input[type=button],
|
|
138
|
+
input[type=submit],
|
|
139
|
+
input[type=reset],
|
|
140
|
+
input[type=radio],
|
|
141
|
+
input[type=checkbox],
|
|
142
|
+
select, button {
|
|
143
|
+
cursor: pointer;
|
|
144
|
+
}
|
|
145
|
+
input, textarea,
|
|
146
|
+
select, button {
|
|
147
|
+
margin: 0;
|
|
148
|
+
}
|
|
149
|
+
textarea {
|
|
150
|
+
line-height: var(--line-height);
|
|
151
|
+
}
|
|
152
|
+
a, button, .button,
|
|
153
|
+
input[type=button] {
|
|
154
|
+
touch-action: manipulation;
|
|
155
|
+
}
|
|
156
|
+
:focus {
|
|
157
|
+
outline: 0;
|
|
158
|
+
}
|
|
159
|
+
:focus-visible {
|
|
160
|
+
outline: 2px solid currentColor;
|
|
161
|
+
outline-offset: 2px;
|
|
162
|
+
}
|
|
163
|
+
[hidden] {
|
|
164
|
+
display: none !important;
|
|
165
|
+
}
|
|
166
|
+
hr {
|
|
167
|
+
display: block;
|
|
168
|
+
height: .1rem;
|
|
169
|
+
margin: 1.6rem 0;
|
|
170
|
+
border: none;
|
|
171
|
+
background-color: #88888822;
|
|
172
|
+
}
|
|
173
|
+
sup, sub {
|
|
174
|
+
position: relative;
|
|
175
|
+
top: -.8em;
|
|
176
|
+
font-size: 1.1em;
|
|
177
|
+
}
|
|
178
|
+
sub {
|
|
179
|
+
top: auto;
|
|
180
|
+
bottom: -.8em;
|
|
181
|
+
}
|
|
182
|
+
mark {
|
|
183
|
+
margin: 0 -.4em;
|
|
184
|
+
padding: 0 .4em;
|
|
185
|
+
background-color: #fe0;
|
|
186
|
+
}
|
|
187
|
+
code, kbd, samp {
|
|
188
|
+
font-family: var(--font-family-mono);
|
|
189
|
+
}
|
|
190
|
+
strong, b {
|
|
191
|
+
font-weight: 700;
|
|
192
|
+
}
|
|
193
|
+
em, i, var, dfn, cite {
|
|
194
|
+
font-style: italic;
|
|
195
|
+
}
|
|
196
|
+
ins, u {
|
|
197
|
+
text-decoration: underline;
|
|
198
|
+
}
|
|
199
|
+
del, s {
|
|
200
|
+
text-decoration: line-through;
|
|
201
|
+
}
|
|
202
|
+
img {
|
|
203
|
+
display: block;
|
|
204
|
+
width: auto;
|
|
205
|
+
height: auto;
|
|
206
|
+
max-width: 100%;
|
|
207
|
+
}
|
|
208
|
+
ul.reset,
|
|
209
|
+
ol.reset {
|
|
213
210
|
margin: 0;
|
|
214
211
|
padding: 0;
|
|
212
|
+
list-style: none;
|
|
213
|
+
|
|
214
|
+
& > li {
|
|
215
|
+
margin: 0;
|
|
216
|
+
padding: 0;
|
|
217
|
+
}
|
|
215
218
|
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
219
|
+
pre {
|
|
220
|
+
font-family: var(--font-family-mono);
|
|
221
|
+
white-space: pre-wrap;
|
|
222
|
+
}
|
|
223
|
+
|
|
220
224
|
}
|
|
@@ -9,9 +9,11 @@ All right reserved.
|
|
|
9
9
|
|
|
10
10
|
/*
|
|
11
11
|
.scroll
|
|
12
|
-
.
|
|
13
|
-
.
|
|
14
|
-
.
|
|
12
|
+
.scroll_x
|
|
13
|
+
.scroll_y
|
|
14
|
+
.scroll_contain
|
|
15
|
+
.scroll_x-proximity
|
|
16
|
+
.scroll_x-mandatory
|
|
15
17
|
*/
|
|
16
18
|
|
|
17
19
|
:root {
|
|
@@ -20,79 +22,83 @@ All right reserved.
|
|
|
20
22
|
--scroll-scrollbar-thumb-background-hover: #00000022;
|
|
21
23
|
}
|
|
22
24
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
25
|
+
@layer scroll {
|
|
26
|
+
|
|
27
|
+
.scroll {
|
|
28
|
+
flex-wrap: nowrap;
|
|
29
|
+
overflow-x: scroll;
|
|
30
|
+
overflow-y: auto;
|
|
31
|
+
-webkit-overflow-scrolling: touch;
|
|
32
|
+
/* Hide scrollbar in IE and Edge */
|
|
33
|
+
-ms-overflow-style: none;
|
|
34
|
+
/* Hide scrollbar in Firefox */
|
|
35
|
+
scrollbar-width: none;
|
|
36
|
+
touch-action: pan-x;
|
|
37
|
+
|
|
38
|
+
&::-webkit-scrollbar {
|
|
39
|
+
width: var(--scroll-scrollbar-size);
|
|
40
|
+
height: var(--scroll-scrollbar-size);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&::-webkit-scrollbar-track {
|
|
44
|
+
background-color: none;
|
|
45
|
+
border-radius: var(--scroll-scrollbar-size);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&::-webkit-scrollbar-thumb {
|
|
49
|
+
border-radius: var(--scroll-scrollbar-size);
|
|
50
|
+
background-color: var(--scroll-scrollbar-thumb-background);
|
|
51
|
+
will-change: background-color;
|
|
52
|
+
transition: background .2s ease-out;
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&::-webkit-scrollbar-thumb:hover {
|
|
57
|
+
background-color: var(--scroll-scrollbar-thumb-background-hover);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&::-webkit-scrollbar-button,
|
|
61
|
+
&::-webkit-scrollbar-track-piece,
|
|
62
|
+
&::-webkit-scrollbar-corner,
|
|
63
|
+
&::-webkit-resizer {
|
|
64
|
+
display: none;
|
|
65
|
+
}
|
|
37
66
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
67
|
+
|
|
68
|
+
.scroll_x {
|
|
69
|
+
overflow-x: scroll;
|
|
70
|
+
overflow-y: hidden;
|
|
71
|
+
touch-action: pan-x;
|
|
42
72
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
transition: background .2s ease-out;
|
|
49
|
-
cursor: pointer;
|
|
73
|
+
|
|
74
|
+
.scroll_y {
|
|
75
|
+
overflow-x: hidden;
|
|
76
|
+
overflow-y: scroll;
|
|
77
|
+
touch-action: pan-y;
|
|
50
78
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
79
|
+
|
|
80
|
+
.scroll_contain {
|
|
81
|
+
overscroll-behavior: contain;
|
|
54
82
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
&::-webkit-scrollbar-corner,
|
|
59
|
-
&::-webkit-resizer {
|
|
60
|
-
display: none;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.scroll.scroll--x {
|
|
65
|
-
overflow-x: scroll;
|
|
66
|
-
overflow-y: hidden;
|
|
67
|
-
touch-action: pan-x;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.scroll.scroll--y {
|
|
71
|
-
overflow-x: hidden;
|
|
72
|
-
overflow-y: scroll;
|
|
73
|
-
touch-action: pan-y;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.scroll--contain {
|
|
77
|
-
overscroll-behavior: contain;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.scroll--x-proximity {
|
|
81
|
-
scroll-snap-type: x proximity;
|
|
82
|
-
}
|
|
83
|
-
.scroll--x-mandatory {
|
|
84
|
-
scroll-snap-type: x mandatory;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.scroll--x-proximity,
|
|
88
|
-
.scroll--x-mandatory {
|
|
89
|
-
& > * {
|
|
90
|
-
scroll-snap-align: start;
|
|
83
|
+
|
|
84
|
+
.scroll_x-proximity {
|
|
85
|
+
scroll-snap-type: x proximity;
|
|
91
86
|
}
|
|
92
|
-
|
|
93
|
-
scroll-snap-
|
|
87
|
+
.scroll_x-mandatory {
|
|
88
|
+
scroll-snap-type: x mandatory;
|
|
94
89
|
}
|
|
95
|
-
|
|
96
|
-
|
|
90
|
+
|
|
91
|
+
.scroll_x-proximity,
|
|
92
|
+
.scroll_x-mandatory {
|
|
93
|
+
& > * {
|
|
94
|
+
scroll-snap-align: start;
|
|
95
|
+
}
|
|
96
|
+
&.scroll_align-center > * {
|
|
97
|
+
scroll-snap-align: center;
|
|
98
|
+
}
|
|
99
|
+
&.scroll_align-end > * {
|
|
100
|
+
scroll-snap-align: end;
|
|
101
|
+
}
|
|
97
102
|
}
|
|
103
|
+
|
|
98
104
|
}
|
|
@@ -22,74 +22,78 @@ All right reserved.
|
|
|
22
22
|
--slider-object-fit: cover;
|
|
23
23
|
}
|
|
24
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
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
25
|
+
@layer slider {
|
|
26
|
+
|
|
27
|
+
.slider {
|
|
28
|
+
display: flex;
|
|
29
|
+
position: relative;
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
touch-action: auto; /* по умолчанию не блокируем жесты; класс `.slider_touch` включает pan-y */
|
|
33
|
+
overscroll-behavior: contain; /* не отдаём overscroll родителю */
|
|
34
|
+
}
|
|
35
|
+
.slider_touch {
|
|
36
|
+
touch-action: pan-y; /* разрешаем только вертикальные жесты браузеру */
|
|
37
|
+
}
|
|
38
|
+
.slider-wrapper {
|
|
39
|
+
display: flex;
|
|
40
|
+
width: 100%;
|
|
41
|
+
height: 100%;
|
|
42
|
+
pointer-events: auto;
|
|
43
|
+
will-change: transform;
|
|
44
|
+
transform: translateZ(0); /* создаёт отдельный композитный слой */
|
|
45
|
+
backface-visibility: hidden;
|
|
46
|
+
}
|
|
47
|
+
.slider-item {
|
|
48
|
+
display: flex;
|
|
49
|
+
position: relative;
|
|
50
|
+
min-width: 100%;
|
|
51
|
+
flex: 0 0 100%,
|
|
52
|
+
}
|
|
53
|
+
.slider-item a {
|
|
54
|
+
display: block;
|
|
55
|
+
width: 100%;
|
|
56
|
+
height: 100%;
|
|
57
|
+
}
|
|
58
|
+
.slider-item img {
|
|
59
|
+
width: 100%;
|
|
60
|
+
max-width: none;
|
|
61
|
+
height: 100%;
|
|
62
|
+
object-fit: var(--slider-object-fit);
|
|
63
|
+
pointer-events: auto;
|
|
64
|
+
}
|
|
65
|
+
.slider-indicators {
|
|
66
|
+
display: flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
position: absolute;
|
|
69
|
+
left: var(--slider-indicators-left);
|
|
70
|
+
right: var(--slider-indicators-right);
|
|
71
|
+
top: var(--slider-indicators-top);
|
|
72
|
+
bottom: var(--slider-indicators-bottom);
|
|
73
|
+
width: var(--slider-indicators-width);
|
|
74
|
+
height: var(--slider-indicators-height);
|
|
75
|
+
gap: var(--slider-indicators-gap);
|
|
76
|
+
opacity: var(--slider-indicators-init-opacity);
|
|
77
|
+
will-change: opacity;
|
|
78
|
+
transition: opacity .2s ease-out;
|
|
79
|
+
pointer-events: none;
|
|
80
|
+
}
|
|
81
|
+
.slider-indicators span {
|
|
82
|
+
display: flex;
|
|
83
|
+
flex: 1;
|
|
84
|
+
width: var(--slider-point-size);
|
|
85
|
+
min-width: var(--slider-point-size);
|
|
86
|
+
height: var(--slider-point-size);
|
|
87
|
+
border-radius: var(--slider-point-size);
|
|
88
|
+
background: var(--slider-point-color);
|
|
89
|
+
transition: background .1s ease-out;
|
|
90
|
+
}
|
|
91
|
+
.slider-indicators span.active {
|
|
92
|
+
background: var(--slider-point-color-active);
|
|
93
|
+
}
|
|
94
|
+
html.touch .slider .slider-indicators,
|
|
95
|
+
.slider:hover .slider-indicators {
|
|
96
|
+
opacity: 1;
|
|
97
|
+
}
|
|
98
|
+
|
|
95
99
|
}
|