@andreyshpigunov/x 0.5.1 → 0.5.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/assets/css/app.css +1 -1
- package/assets/js/app.js +1 -1
- package/dist/x.css +1 -1
- package/index.html +1 -1
- package/package.json +1 -1
- package/src/components/x/dropdown.css +2 -0
- package/src/components/x/helpers.css +106 -0
- package/src/components/x/typo.css +0 -110
- package/src/css/x.css +10 -10
- package/src/js/app.js +2 -2
package/index.html
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"functionName": "headerAnimation"
|
|
20
20
|
}'>
|
|
21
21
|
<header class="header flex aic sticky t0 px5 m:px6 l:px8 unselectable">
|
|
22
|
-
<div class="header-version nowrap">0.5.
|
|
22
|
+
<div class="header-version nowrap">0.5.3</div>
|
|
23
23
|
<div class="header-logo mxa">
|
|
24
24
|
<a role="button" x-scrollto="#top">
|
|
25
25
|
<img src="assets/img/logo.png" alt="x" />
|
package/package.json
CHANGED
|
@@ -14,6 +14,7 @@ All right reserved.
|
|
|
14
14
|
--dropdown-padding: .8rem;
|
|
15
15
|
--dropdown-max-width: 28rem;
|
|
16
16
|
--dropdown-item-padding: .6rem 2.4rem .6rem 1.2rem;
|
|
17
|
+
--dropdown-item-font-size: inherit;
|
|
17
18
|
--dropdown-item-font-color: black;
|
|
18
19
|
--dropdown-item-font-color-hover: black;
|
|
19
20
|
--dropdown-item-background-color: white;
|
|
@@ -131,6 +132,7 @@ All right reserved.
|
|
|
131
132
|
display: block;
|
|
132
133
|
padding: var(--dropdown-item-padding);
|
|
133
134
|
line-height: 1.4;
|
|
135
|
+
font-size: var(--dropdown-item-font-size);
|
|
134
136
|
color: var(--dropdown-item-font-color);
|
|
135
137
|
white-space: nowrap;
|
|
136
138
|
text-overflow: ellipsis;
|
|
@@ -101,6 +101,14 @@ All right reserved.
|
|
|
101
101
|
.br100 (s,m,l,xl)
|
|
102
102
|
.sh[0-10] (s,m,l,xl)
|
|
103
103
|
.o[0-10] (s,m,l,xl)
|
|
104
|
+
.mono
|
|
105
|
+
.italic
|
|
106
|
+
.strike
|
|
107
|
+
.fs[10-19] step 1 (m,l,xl) - size in rem - 1.0, 1.1, 1.2, ..., 1.9
|
|
108
|
+
.fs[20-64] step 2 (m,l,xl) - size in rem - 2.0, 2.2, 2.4, ..., 6.4
|
|
109
|
+
.fw[100-900] step 100 (m,l,xl)
|
|
110
|
+
.ls[0-4] (m,l,xl)
|
|
111
|
+
.lh[0-9] (m,l,xl) - values: 1.0-1.9
|
|
104
112
|
.no-print
|
|
105
113
|
*/
|
|
106
114
|
|
|
@@ -1094,6 +1102,104 @@ All right reserved.
|
|
|
1094
1102
|
}
|
|
1095
1103
|
|
|
1096
1104
|
|
|
1105
|
+
/* !- Font styles */
|
|
1106
|
+
.mono { font-family: var(--font-family-mono, monospace) }
|
|
1107
|
+
.italic { font-style: italic }
|
|
1108
|
+
.strike { text-decoration: line-through }
|
|
1109
|
+
|
|
1110
|
+
|
|
1111
|
+
/* !- Font sizes */
|
|
1112
|
+
@for $i from 10 to 19 {
|
|
1113
|
+
.fs$(i) { font-size: calc($(i)rem / 10) }
|
|
1114
|
+
}
|
|
1115
|
+
@for $i from 20 to 64 by 2 {
|
|
1116
|
+
.fs$(i) { font-size: calc($(i)rem / 10) }
|
|
1117
|
+
}
|
|
1118
|
+
@for $i from 100 to 900 by 100 {
|
|
1119
|
+
.fw$(i) { font-weight: $(i) }
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
@media (min-width: 768px) {
|
|
1123
|
+
@for $i from 10 to 19 {
|
|
1124
|
+
.m\:fs$(i) { font-size: calc($(i)rem / 10) }
|
|
1125
|
+
}
|
|
1126
|
+
@for $i from 20 to 64 by 2 {
|
|
1127
|
+
.m\:fs$(i) { font-size: calc($(i)rem / 10) }
|
|
1128
|
+
}
|
|
1129
|
+
@for $i from 100 to 900 by 100 {
|
|
1130
|
+
.m\:fw$(i) { font-weight: $(i) }
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
@media (min-width: 1024px) {
|
|
1135
|
+
@for $i from 10 to 19 {
|
|
1136
|
+
.l\:fs$(i) { font-size: calc($(i)rem / 10) }
|
|
1137
|
+
}
|
|
1138
|
+
@for $i from 20 to 64 by 2 {
|
|
1139
|
+
.l\:fs$(i) { font-size: calc($(i)rem / 10) }
|
|
1140
|
+
}
|
|
1141
|
+
@for $i from 100 to 900 by 100 {
|
|
1142
|
+
.l\:fw$(i) { font-weight: $(i) }
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
@media (min-width: 1280px) {
|
|
1147
|
+
@for $i from 10 to 19 {
|
|
1148
|
+
.xl\:fs$(i) { font-size: calc($(i)rem / 10) }
|
|
1149
|
+
}
|
|
1150
|
+
@for $i from 20 to 64 by 2 {
|
|
1151
|
+
.xl\:fs$(i) { font-size: calc($(i)rem / 10) }
|
|
1152
|
+
}
|
|
1153
|
+
@for $i from 100 to 900 by 100 {
|
|
1154
|
+
.xl\:fw$(i) { font-weight: $(i) }
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
|
|
1159
|
+
/* !- Letter spacing */
|
|
1160
|
+
@for $i from 0 to 4 {
|
|
1161
|
+
.ls$(i) { letter-spacing: calc($(i)em * 0.625) }
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
@media (min-width: 768px) {
|
|
1165
|
+
@for $i from 0 to 4 {
|
|
1166
|
+
.m\:ls$(i) { letter-spacing: calc($(i)em * 0.625) }
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
@media (min-width: 1024px) {
|
|
1170
|
+
@for $i from 0 to 4 {
|
|
1171
|
+
.l\:ls$(i) { letter-spacing: calc($(i)em * 0.625) }
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
@media (min-width: 1280px) {
|
|
1175
|
+
@for $i from 0 to 4 {
|
|
1176
|
+
.xl\:ls$(i) { letter-spacing: calc($(i)em * 0.625) }
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
|
|
1180
|
+
|
|
1181
|
+
/* !- Line height */
|
|
1182
|
+
@for $i from 0 to 9 {
|
|
1183
|
+
.lh$(i) { line-height: 1.$(i) }
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
@media (min-width: 768px) {
|
|
1187
|
+
@for $i from 0 to 9 {
|
|
1188
|
+
.m\:lh$(i) { line-height: 1.$(i) }
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
@media (min-width: 1024px) {
|
|
1192
|
+
@for $i from 0 to 9 {
|
|
1193
|
+
.l\:lh$(i) { line-height: 1.$(i) }
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
@media (min-width: 1280px) {
|
|
1197
|
+
@for $i from 0 to 9 {
|
|
1198
|
+
.xl\:lh$(i) { line-height: 1.$(i) }
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
|
|
1097
1203
|
/* !- Print */
|
|
1098
1204
|
@media print {
|
|
1099
1205
|
.no-print {
|
|
@@ -9,14 +9,6 @@ All right reserved.
|
|
|
9
9
|
|
|
10
10
|
/*
|
|
11
11
|
.h[1-6]
|
|
12
|
-
.mono
|
|
13
|
-
.italic
|
|
14
|
-
.strike
|
|
15
|
-
.fs[10-19] step 1 (m,l,xl) - size in rem - 1.0, 1.1, 1.2, ..., 1.9
|
|
16
|
-
.fs[20-64] step 2 (m,l,xl) - size in rem - 2.0, 2.2, 2.4, ..., 6.4
|
|
17
|
-
.fw[100-900] step 100 (m,l,xl)
|
|
18
|
-
.ls[0-4] (m,l,xl)
|
|
19
|
-
.lh[0-9] (m,l,xl) - values: 1.0-1.9
|
|
20
12
|
*/
|
|
21
13
|
|
|
22
14
|
:root {
|
|
@@ -187,106 +179,4 @@ All right reserved.
|
|
|
187
179
|
}
|
|
188
180
|
}
|
|
189
181
|
|
|
190
|
-
|
|
191
|
-
/* !- Font styles */
|
|
192
|
-
|
|
193
|
-
.mono { font-family: var(--font-family-mono, monospace) }
|
|
194
|
-
.italic { font-style: italic }
|
|
195
|
-
.strike { text-decoration: line-through }
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
/* !- Font sizes */
|
|
199
|
-
|
|
200
|
-
@for $i from 10 to 19 {
|
|
201
|
-
.fs$(i) { font-size: calc($(i)rem / 10) }
|
|
202
|
-
}
|
|
203
|
-
@for $i from 20 to 64 by 2 {
|
|
204
|
-
.fs$(i) { font-size: calc($(i)rem / 10) }
|
|
205
|
-
}
|
|
206
|
-
@for $i from 100 to 900 by 100 {
|
|
207
|
-
.fw$(i) { font-weight: $(i) }
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
@media (min-width: 768px) {
|
|
211
|
-
@for $i from 10 to 19 {
|
|
212
|
-
.m\:fs$(i) { font-size: calc($(i)rem / 10) }
|
|
213
|
-
}
|
|
214
|
-
@for $i from 20 to 64 by 2 {
|
|
215
|
-
.m\:fs$(i) { font-size: calc($(i)rem / 10) }
|
|
216
|
-
}
|
|
217
|
-
@for $i from 100 to 900 by 100 {
|
|
218
|
-
.m\:fw$(i) { font-weight: $(i) }
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
@media (min-width: 1024px) {
|
|
223
|
-
@for $i from 10 to 19 {
|
|
224
|
-
.l\:fs$(i) { font-size: calc($(i)rem / 10) }
|
|
225
|
-
}
|
|
226
|
-
@for $i from 20 to 64 by 2 {
|
|
227
|
-
.l\:fs$(i) { font-size: calc($(i)rem / 10) }
|
|
228
|
-
}
|
|
229
|
-
@for $i from 100 to 900 by 100 {
|
|
230
|
-
.l\:fw$(i) { font-weight: $(i) }
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
@media (min-width: 1280px) {
|
|
235
|
-
@for $i from 10 to 19 {
|
|
236
|
-
.xl\:fs$(i) { font-size: calc($(i)rem / 10) }
|
|
237
|
-
}
|
|
238
|
-
@for $i from 20 to 64 by 2 {
|
|
239
|
-
.xl\:fs$(i) { font-size: calc($(i)rem / 10) }
|
|
240
|
-
}
|
|
241
|
-
@for $i from 100 to 900 by 100 {
|
|
242
|
-
.xl\:fw$(i) { font-weight: $(i) }
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
/* !- Letter spacing */
|
|
248
|
-
|
|
249
|
-
@for $i from 0 to 4 {
|
|
250
|
-
.ls$(i) { letter-spacing: calc($(i)em * 0.625) }
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
@media (min-width: 768px) {
|
|
254
|
-
@for $i from 0 to 4 {
|
|
255
|
-
.m\:ls$(i) { letter-spacing: calc($(i)em * 0.625) }
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
@media (min-width: 1024px) {
|
|
259
|
-
@for $i from 0 to 4 {
|
|
260
|
-
.l\:ls$(i) { letter-spacing: calc($(i)em * 0.625) }
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
@media (min-width: 1280px) {
|
|
264
|
-
@for $i from 0 to 4 {
|
|
265
|
-
.xl\:ls$(i) { letter-spacing: calc($(i)em * 0.625) }
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
/* !- Line height */
|
|
271
|
-
|
|
272
|
-
@for $i from 0 to 9 {
|
|
273
|
-
.lh$(i) { line-height: 1.$(i) }
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
@media (min-width: 768px) {
|
|
277
|
-
@for $i from 0 to 9 {
|
|
278
|
-
.m\:lh$(i) { line-height: 1.$(i) }
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
@media (min-width: 1024px) {
|
|
282
|
-
@for $i from 0 to 9 {
|
|
283
|
-
.l\:lh$(i) { line-height: 1.$(i) }
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
@media (min-width: 1280px) {
|
|
287
|
-
@for $i from 0 to 9 {
|
|
288
|
-
.xl\:lh$(i) { line-height: 1.$(i) }
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
|
|
292
182
|
}
|
package/src/css/x.css
CHANGED
|
@@ -7,10 +7,11 @@ All right reserved.
|
|
|
7
7
|
----------------------------------------*/
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
@layer reset, space, links, grid, flex, flow, form, buttons, dropdown, sheets, slider, sticky, modal, scroll, icons,
|
|
10
|
+
@layer reset, space, typo, links, grid, flex, flow, form, buttons, dropdown, sheets, slider, sticky, modal, scroll, icons, helpers, colors;
|
|
11
11
|
|
|
12
12
|
@import "../components/x/reset.css";
|
|
13
13
|
@import "../components/x/space.css";
|
|
14
|
+
@import "../components/x/typo.css";
|
|
14
15
|
@import "../components/x/links.css";
|
|
15
16
|
@import "../components/x/grid.css";
|
|
16
17
|
@import "../components/x/flex.css";
|
|
@@ -25,7 +26,6 @@ All right reserved.
|
|
|
25
26
|
/* @import "../components/x/debug.css"; */
|
|
26
27
|
@import "../components/x/scroll.css";
|
|
27
28
|
@import "../components/x/icons.css";
|
|
28
|
-
@import "../components/x/typo.css";
|
|
29
29
|
@import "../components/x/helpers.css";
|
|
30
30
|
@import "../components/x/colors.css";
|
|
31
31
|
|
|
@@ -187,6 +187,14 @@ All right reserved.
|
|
|
187
187
|
.br100 (s,m,l,xl)
|
|
188
188
|
.sh[0-10] (s,m,l,xl)
|
|
189
189
|
.o[0-10] (s,m,l,xl)
|
|
190
|
+
.mono
|
|
191
|
+
.italic
|
|
192
|
+
.strike
|
|
193
|
+
.fs[10-19] step 1 (m,l,xl) - size in rem - 1.0, 1.1, 1.2, ..., 1.9
|
|
194
|
+
.fs[20-64] step 2 (m,l,xl) - size in rem - 2.0, 2.2, 2.4, ..., 6.4
|
|
195
|
+
.fw[100-900] step 100 (m,l,xl)
|
|
196
|
+
.ls[0-4] (m,l,xl)
|
|
197
|
+
.lh[0-9] (m,l,xl) - values: 1.0-1.9
|
|
190
198
|
.no-print
|
|
191
199
|
*/
|
|
192
200
|
|
|
@@ -222,12 +230,4 @@ All right reserved.
|
|
|
222
230
|
|
|
223
231
|
/*
|
|
224
232
|
.h[1-6]
|
|
225
|
-
.mono
|
|
226
|
-
.italic
|
|
227
|
-
.strike
|
|
228
|
-
.fs[10-19] step 1 (m,l,xl) - size in rem - 1.0, 1.1, 1.2, ..., 1.9
|
|
229
|
-
.fs[20-64] step 2 (m,l,xl) - size in rem - 2.0, 2.2, 2.4, ..., 6.4
|
|
230
|
-
.fw[100-900] step 100 (m,l,xl)
|
|
231
|
-
.ls[0-4] (m,l,xl)
|
|
232
|
-
.lh[0-9] (m,l,xl) - values: 1.0-1.9
|
|
233
233
|
*/
|
package/src/js/app.js
CHANGED
|
@@ -31,7 +31,7 @@ window.element3 = (params) => {
|
|
|
31
31
|
}
|
|
32
32
|
window.headerAnimation = (params) => {
|
|
33
33
|
// console.log(x.device.size.s);
|
|
34
|
-
let _height = 100;
|
|
34
|
+
let _height = (x.device.size.xs || x.device.size.s) ? 100 : 120;
|
|
35
35
|
// console.log(_height);
|
|
36
36
|
let header = x.qs('.header');
|
|
37
37
|
let headerLogo = x.qs('.header-logo img');
|
|
@@ -44,4 +44,4 @@ window.headerAnimation = (params) => {
|
|
|
44
44
|
|
|
45
45
|
window.onload = () => {
|
|
46
46
|
x.lib.transitionsOn()
|
|
47
|
-
}
|
|
47
|
+
}
|