@andreyshpigunov/x 0.5.2 → 0.5.4

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/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.2</div>
22
+ <div class="header-version nowrap">0.5.4</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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andreyshpigunov/x",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
4
4
  "x-js": "dist/x.js",
5
5
  "app-js": "assets/js/app.js",
6
6
  "targets": {
@@ -6,6 +6,7 @@ Created by Andrey Shpigunov at 20.03.2025
6
6
  All right reserved.
7
7
  ----------------------------------------*/
8
8
 
9
+
9
10
  /*
10
11
  .button
11
12
  .button_label
@@ -20,53 +21,6 @@ All right reserved.
20
21
  .buttons-group
21
22
  */
22
23
 
23
- :root {
24
- /*
25
- External variables:
26
- typo.css
27
- --font-family
28
- --font-size
29
- colors.css
30
- --color-grey
31
- --color-primary
32
- --color-success
33
- --color-warning
34
- --color-danger
35
- */
36
-
37
- /* Required variables */
38
- --button-height-coeff: 2.5;
39
- --button-side-padding-coeff: 1.25;
40
- --button-color: var(--color-grey);
41
- --button-font-family: var(--font-family);
42
- --button-font-color: #000;
43
- --button-font-weight: 400;
44
- --button-transition: all .1s ease-out;
45
- --button-font-size: var(--font-size);
46
- --button-transform: translate(0,0);
47
- --button-transform-hover: none;
48
- --button-transform-active: translate(0,.1rem);
49
- --button-transform-origin: center bottom;
50
- --button-box-shadow: 0 .1rem .1rem #00000011;
51
- --button-box-shadow-hover: 0 .1rem .1rem #00000022;
52
- --button-box-shadow-active: inset 0 0 .1rem #00000011;
53
- --button-disabled-opacity: .5;
54
- --button-border-radius: calc(var(--button-font-size) * 0.6);
55
-
56
- /* Strength of hover (lighten) / active (darken). Override on :root or .button--* to tune. */
57
- --button-hover-lighten: 10%;
58
- --button-active-darken: 5%;
59
-
60
- /*
61
- Additional variables and their default values:
62
- --button-height: 4rem;
63
- --button-side-padding: 2rem;
64
- --button-hover-lighten: 20% (how much white to mix on hover);
65
- --button-active-darken: 20% (how much black to mix on active).
66
- Override --button-color-hover / --button-color-active for custom behaviour (e.g. .button--clear).
67
- */
68
- }
69
-
70
24
  @layer buttons {
71
25
 
72
26
  .button, [type=submit] {
@@ -26,17 +26,6 @@ All right reserved.
26
26
  .bg-grey
27
27
  */
28
28
 
29
- :root {
30
- --color-primary: #0088ee;
31
- --color-success: #33c433;
32
- --color-warning: #ff8800;
33
- --color-danger: #ee3333;
34
- --color-error: #ee3333;
35
- --color-black: #fff;
36
- --color-white: #000;
37
- --color-grey: #f4f5f6;
38
- }
39
-
40
29
  @layer colors {
41
30
 
42
31
  .color-primary {
@@ -7,20 +7,6 @@ All right reserved.
7
7
  ----------------------------------------*/
8
8
 
9
9
 
10
- :root {
11
- --dropdown-border-radius: 1.2rem;
12
- --dropdown-backgroud-color: white;
13
- --dropdown-box-shadow: var(--shadow-4);
14
- --dropdown-padding: .8rem;
15
- --dropdown-max-width: 28rem;
16
- --dropdown-item-padding: .6rem 2.4rem .6rem 1.2rem;
17
- --dropdown-item-font-color: black;
18
- --dropdown-item-font-color-hover: black;
19
- --dropdown-item-background-color: white;
20
- --dropdown-item-background-color-hover: var(--color-grey);
21
- --dropdown-divider-color: var(--color-grey);
22
- }
23
-
24
10
  @layer dropdown {
25
11
 
26
12
  [x-dropdown] {
@@ -131,6 +117,7 @@ All right reserved.
131
117
  display: block;
132
118
  padding: var(--dropdown-item-padding);
133
119
  line-height: 1.4;
120
+ font-size: var(--dropdown-item-font-size);
134
121
  color: var(--dropdown-item-font-color);
135
122
  white-space: nowrap;
136
123
  text-overflow: ellipsis;
@@ -6,6 +6,7 @@ Created by Andrey Shpigunov at 20.03.2025
6
6
  All right reserved.
7
7
  ----------------------------------------*/
8
8
 
9
+
9
10
  /*
10
11
  .flex (s,m,l,xl)
11
12
 
@@ -6,6 +6,7 @@ Created by Andrey Shpigunov at 20.03.2025
6
6
  All right reserved.
7
7
  ----------------------------------------*/
8
8
 
9
+
9
10
  /*
10
11
  .flow
11
12
  .flow.s[0-10] (s,m,l,xl) - vertical space
@@ -7,35 +7,6 @@ All right reserved.
7
7
  ----------------------------------------*/
8
8
 
9
9
 
10
- :root {
11
- --form-width: 40rem;
12
- --form-height-coeff: 2.6;
13
- --form-side-padding: 1rem;
14
-
15
- --form-font-size: var(--font-size);
16
- --form-font-color: #000;
17
- --form-font-color-readonly: #000;
18
- --form-font-color-disabled: #666;
19
- --form-font-color-placeholder: #ccc;
20
-
21
- --form-border-width: .1rem;
22
- --form-border-radius: .8rem;
23
- --form-border-color: #d4d4d4;
24
- --form-border-color-focused: #8cf;
25
- --form-border-color-error: #f00;
26
- --form-border-color-readonly: #ddd;
27
- --form-border-color-disabled: #ddd;
28
-
29
- --form-background-color: #fff;
30
- --form-background-color-readonly: #fafafa;
31
- --form-background-color-disabled: #f6f6f6;
32
-
33
- /*
34
- Additional variables and their default values:
35
- --form-height: 4rem;
36
- */
37
- }
38
-
39
10
  @layer form {
40
11
 
41
12
  input[type="color"],
@@ -6,6 +6,7 @@ Created by Andrey Shpigunov at 20.03.2025
6
6
  All right reserved.
7
7
  ----------------------------------------*/
8
8
 
9
+
9
10
  /*
10
11
  .grid (s,m,l,xl)
11
12
  .grid.g[1-12] (s,m,l,xl) - columns limit in grid
@@ -13,7 +14,6 @@ All right reserved.
13
14
  .grid > .c[1-12]/[1-12] (s,m,l,xl) - columns range for content
14
15
  */
15
16
 
16
-
17
17
  @layer grid {
18
18
 
19
19
  .grid { display: grid }
@@ -101,25 +101,17 @@ 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
 
107
-
108
- :root {
109
- --container-max-width: 160rem;
110
-
111
- --shadow-1: 0 2px 4px #00000016;
112
- --shadow-2: 0 4px 8px #00000016;
113
- --shadow-3: 0 6px 12px #00000016;
114
- --shadow-4: 0 8px 16px #00000016;
115
- --shadow-5: 0 10px 20px #00000016;
116
- --shadow-6: 0 12px 24px #00000016;
117
- --shadow-7: 0 14px 28px #00000016;
118
- --shadow-8: 0 16px 32px #00000016;
119
- --shadow-9: 0 18px 36px #00000016;
120
- --shadow-10: 0 20px 40px #00000016;
121
- }
122
-
123
115
  @layer helpers {
124
116
 
125
117
  /* !- Font smoothing */
@@ -1094,6 +1086,104 @@ All right reserved.
1094
1086
  }
1095
1087
 
1096
1088
 
1089
+ /* !- Font styles */
1090
+ .mono { font-family: var(--font-family-mono, monospace) }
1091
+ .italic { font-style: italic }
1092
+ .strike { text-decoration: line-through }
1093
+
1094
+
1095
+ /* !- Font sizes */
1096
+ @for $i from 10 to 19 {
1097
+ .fs$(i) { font-size: calc($(i)rem / 10) }
1098
+ }
1099
+ @for $i from 20 to 64 by 2 {
1100
+ .fs$(i) { font-size: calc($(i)rem / 10) }
1101
+ }
1102
+ @for $i from 100 to 900 by 100 {
1103
+ .fw$(i) { font-weight: $(i) }
1104
+ }
1105
+
1106
+ @media (min-width: 768px) {
1107
+ @for $i from 10 to 19 {
1108
+ .m\:fs$(i) { font-size: calc($(i)rem / 10) }
1109
+ }
1110
+ @for $i from 20 to 64 by 2 {
1111
+ .m\:fs$(i) { font-size: calc($(i)rem / 10) }
1112
+ }
1113
+ @for $i from 100 to 900 by 100 {
1114
+ .m\:fw$(i) { font-weight: $(i) }
1115
+ }
1116
+ }
1117
+
1118
+ @media (min-width: 1024px) {
1119
+ @for $i from 10 to 19 {
1120
+ .l\:fs$(i) { font-size: calc($(i)rem / 10) }
1121
+ }
1122
+ @for $i from 20 to 64 by 2 {
1123
+ .l\:fs$(i) { font-size: calc($(i)rem / 10) }
1124
+ }
1125
+ @for $i from 100 to 900 by 100 {
1126
+ .l\:fw$(i) { font-weight: $(i) }
1127
+ }
1128
+ }
1129
+
1130
+ @media (min-width: 1280px) {
1131
+ @for $i from 10 to 19 {
1132
+ .xl\:fs$(i) { font-size: calc($(i)rem / 10) }
1133
+ }
1134
+ @for $i from 20 to 64 by 2 {
1135
+ .xl\:fs$(i) { font-size: calc($(i)rem / 10) }
1136
+ }
1137
+ @for $i from 100 to 900 by 100 {
1138
+ .xl\:fw$(i) { font-weight: $(i) }
1139
+ }
1140
+ }
1141
+
1142
+
1143
+ /* !- Letter spacing */
1144
+ @for $i from 0 to 4 {
1145
+ .ls$(i) { letter-spacing: calc($(i)em * 0.625) }
1146
+ }
1147
+
1148
+ @media (min-width: 768px) {
1149
+ @for $i from 0 to 4 {
1150
+ .m\:ls$(i) { letter-spacing: calc($(i)em * 0.625) }
1151
+ }
1152
+ }
1153
+ @media (min-width: 1024px) {
1154
+ @for $i from 0 to 4 {
1155
+ .l\:ls$(i) { letter-spacing: calc($(i)em * 0.625) }
1156
+ }
1157
+ }
1158
+ @media (min-width: 1280px) {
1159
+ @for $i from 0 to 4 {
1160
+ .xl\:ls$(i) { letter-spacing: calc($(i)em * 0.625) }
1161
+ }
1162
+ }
1163
+
1164
+
1165
+ /* !- Line height */
1166
+ @for $i from 0 to 9 {
1167
+ .lh$(i) { line-height: 1.$(i) }
1168
+ }
1169
+
1170
+ @media (min-width: 768px) {
1171
+ @for $i from 0 to 9 {
1172
+ .m\:lh$(i) { line-height: 1.$(i) }
1173
+ }
1174
+ }
1175
+ @media (min-width: 1024px) {
1176
+ @for $i from 0 to 9 {
1177
+ .l\:lh$(i) { line-height: 1.$(i) }
1178
+ }
1179
+ }
1180
+ @media (min-width: 1280px) {
1181
+ @for $i from 0 to 9 {
1182
+ .xl\:lh$(i) { line-height: 1.$(i) }
1183
+ }
1184
+ }
1185
+
1186
+
1097
1187
  /* !- Print */
1098
1188
  @media print {
1099
1189
  .no-print {
@@ -21,26 +21,6 @@ All right reserved.
21
21
  a.link_wavy
22
22
  */
23
23
 
24
- :root {
25
- --link-color: #0060cc;
26
- --link-decoration-line: underline;
27
- --link-decoration-style: solid;
28
-
29
- /*
30
- Additional variables and their default values:
31
- --link-color-hover: var(--link-color);
32
- --link-color-visited: var(--link-color);
33
- --link-decoration-line-hover: var(--link-decoration-line-hover, var(--link-decoration-line));
34
- --link-decoration-style-hover: var(--link-decoration-style-hover, var(--link-decoration-style));
35
- --link-decoration-thickness: .06em;
36
- --link-decoration-color: color-mix(in srgb, currentcolor, transparent 75%);
37
- --link-decoration-color-hover: currentcolor;
38
- --link-decoration-color-visited: currentcolor;
39
- --link-underline-offset: .25em;
40
- --link-transition: all .1s ease-out;
41
- */
42
- }
43
-
44
24
  @layer links {
45
25
 
46
26
  a {
@@ -7,27 +7,6 @@ All right reserved.
7
7
  ----------------------------------------*/
8
8
 
9
9
 
10
- :root {
11
- --modal-margin-top: 3vw;
12
- --modal-margin-bottom: 3vw;
13
- --modal-margin-left: 3vw;
14
- --modal-margin-right: 3vw;
15
- --modal-padding-top: clamp(2.5rem, 4vw, 5rem);
16
- --modal-padding-bottom: clamp(2.5rem, 4vw, 5rem);
17
- --modal-padding-left: clamp(2.5rem, 4vw, 5rem);
18
- --modal-padding-right: clamp(2.5rem, 4vw, 5rem);
19
- --modal-background: #fff;
20
- --modal-box-shadow: 0 1rem 4rem #00000033;
21
- --modal-border-radius: 1.6rem;
22
- --modal-closer-margin: .6rem;
23
- --modal-closer-area: 4rem;
24
- --modal-closer-size: 2.4rem;
25
- --modal-closer-width: .2rem;
26
- --modal-closer-color: #ccc;
27
- --modal-closer-color-hover: #f00;
28
- --modal-overlay-background-color: #00000066;
29
- }
30
-
31
10
  @layer modal {
32
11
 
33
12
  html.modal_active body {
@@ -19,32 +19,6 @@ All right reserved.
19
19
  All queries are mobile first.
20
20
  */
21
21
 
22
- :root {
23
- /* Base variables */
24
- --font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif,
25
- "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
26
- --font-family-mono: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
27
- --line-height: 1.5;
28
- --font-size-base: 62.5%;
29
- --font-size: 1.6rem;
30
- --font-scale: 1;
31
- --font-color: #000;
32
- --background-color: #fff;
33
-
34
- /* Spaces */
35
- --space-0: 0;
36
- --space-1: 0.4rem;
37
- --space-2: 0.8rem;
38
- --space-3: 1.2rem;
39
- --space-4: 1.6rem;
40
- --space-5: 2.0rem;
41
- --space-6: 2.4rem;
42
- --space-7: 3.2rem;
43
- --space-8: 4.0rem;
44
- --space-9: 4.8rem;
45
- --space-10: 6.4rem;
46
- }
47
-
48
22
  @layer reset {
49
23
 
50
24
  html, body, main, div, span, object, iframe,
@@ -16,12 +16,6 @@ All right reserved.
16
16
  .scroll_x-mandatory
17
17
  */
18
18
 
19
- :root {
20
- --scroll-scrollbar-size: 6px;
21
- --scroll-scrollbar-thumb-background: #00000011;
22
- --scroll-scrollbar-thumb-background-hover: #00000022;
23
- }
24
-
25
19
  @layer scroll {
26
20
 
27
21
  .scroll {
@@ -7,21 +7,6 @@ All right reserved.
7
7
  ----------------------------------------*/
8
8
 
9
9
 
10
- :root {
11
- --slider-point-color: #ffffff66;
12
- --slider-point-color-active: #fff;
13
- --slider-point-size: .3rem;
14
- --slider-indicators-gap: .3rem;
15
- --slider-indicators-top: auto;
16
- --slider-indicators-left: 1.2rem;
17
- --slider-indicators-right: 1.2rem;
18
- --slider-indicators-bottom: 1rem;
19
- --slider-indicators-width: auto;
20
- --slider-indicators-height: var(--slider-point-size);
21
- --slider-indicators-init-opacity: 0;
22
- --slider-object-fit: cover;
23
- }
24
-
25
10
  @layer slider {
26
11
 
27
12
  .slider {
@@ -9,52 +9,8 @@ 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
- :root {
23
- --headers-margin-top: 1em;
24
- --headers-margin-bottom: .5em;
25
- --headers-font-family: var(--font-family);
26
- --headers-font-weight: 700;
27
- --headers-font-color: var(--font-color);
28
-
29
- --h1-font-size: 3.2rem;
30
- --h2-font-size: 2.4rem;
31
- --h3-font-size: 2.0rem;
32
- --h4-font-size: 1.6rem;
33
- --h5-font-size: 1.4rem;
34
- --h6-font-size: 1.2rem;
35
-
36
- --h1-line-height: 1.2;
37
- --h2-line-height: 1.3;
38
- --h3-line-height: 1.4;
39
-
40
- --paragraph-margin: 1em;
41
-
42
- --figure-margin: 2.5em auto 2em;
43
- --figcaption-margin-top: .5em;
44
- --figcaption-font-size: var(--font-size);
45
- --figcaption-color: #999;
46
-
47
- --blockquote-margin: 2em 0;
48
- --blockquote-padding: 1em 2em;
49
- --blockquote-border: none;
50
- --blockquote-font-style: italic;
51
-
52
- --table-padding: .5em .75em;
53
- --table-border: 1px solid #e4e4e4;
54
- --table-caption-font-weight: 700;
55
- --table-header-font-weight: 700;
56
- }
57
-
58
14
  @layer typo {
59
15
 
60
16
  /* !- Headers */
@@ -187,106 +143,4 @@ All right reserved.
187
143
  }
188
144
  }
189
145
 
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
146
  }