@andreyshpigunov/x 0.5.3 → 0.5.5

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.
@@ -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,21 +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-size: inherit;
18
- --dropdown-item-font-color: black;
19
- --dropdown-item-font-color-hover: black;
20
- --dropdown-item-background-color: white;
21
- --dropdown-item-background-color-hover: var(--color-grey);
22
- --dropdown-divider-color: var(--color-grey);
23
- }
24
-
25
10
  @layer dropdown {
26
11
 
27
12
  [x-dropdown] {
@@ -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
@@ -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 }
@@ -112,22 +112,6 @@ All right reserved.
112
112
  .no-print
113
113
  */
114
114
 
115
-
116
- :root {
117
- --container-max-width: 160rem;
118
-
119
- --shadow-1: 0 2px 4px #00000016;
120
- --shadow-2: 0 4px 8px #00000016;
121
- --shadow-3: 0 6px 12px #00000016;
122
- --shadow-4: 0 8px 16px #00000016;
123
- --shadow-5: 0 10px 20px #00000016;
124
- --shadow-6: 0 12px 24px #00000016;
125
- --shadow-7: 0 14px 28px #00000016;
126
- --shadow-8: 0 16px 32px #00000016;
127
- --shadow-9: 0 18px 36px #00000016;
128
- --shadow-10: 0 20px 40px #00000016;
129
- }
130
-
131
115
  @layer helpers {
132
116
 
133
117
  /* !- Font smoothing */
@@ -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 {
@@ -11,42 +11,6 @@ All right reserved.
11
11
  .h[1-6]
12
12
  */
13
13
 
14
- :root {
15
- --headers-margin-top: 1em;
16
- --headers-margin-bottom: .5em;
17
- --headers-font-family: var(--font-family);
18
- --headers-font-weight: 700;
19
- --headers-font-color: var(--font-color);
20
-
21
- --h1-font-size: 3.2rem;
22
- --h2-font-size: 2.4rem;
23
- --h3-font-size: 2.0rem;
24
- --h4-font-size: 1.6rem;
25
- --h5-font-size: 1.4rem;
26
- --h6-font-size: 1.2rem;
27
-
28
- --h1-line-height: 1.2;
29
- --h2-line-height: 1.3;
30
- --h3-line-height: 1.4;
31
-
32
- --paragraph-margin: 1em;
33
-
34
- --figure-margin: 2.5em auto 2em;
35
- --figcaption-margin-top: .5em;
36
- --figcaption-font-size: var(--font-size);
37
- --figcaption-color: #999;
38
-
39
- --blockquote-margin: 2em 0;
40
- --blockquote-padding: 1em 2em;
41
- --blockquote-border: none;
42
- --blockquote-font-style: italic;
43
-
44
- --table-padding: .5em .75em;
45
- --table-border: 1px solid #e4e4e4;
46
- --table-caption-font-weight: 700;
47
- --table-header-font-weight: 700;
48
- }
49
-
50
14
  @layer typo {
51
15
 
52
16
  /* !- Headers */
@@ -0,0 +1,220 @@
1
+ /*----------------------------------------
2
+ variables.css
3
+ Переменные
4
+
5
+ Created by Andrey Shpigunov at 15.04.2026
6
+ All right reserved.
7
+ ----------------------------------------*/
8
+
9
+
10
+ @layer variables {
11
+
12
+ :root{
13
+ /* Base variables */
14
+ --font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif,
15
+ "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
16
+ --font-family-mono: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
17
+ --line-height: 1.5;
18
+ --font-size-base: 62.5%;
19
+ --font-size: 1.6rem;
20
+ --font-scale: 1;
21
+ --font-color: #000;
22
+ --background-color: #fff;
23
+
24
+ /* Spaces */
25
+ --space-0: 0;
26
+ --space-1: 0.4rem;
27
+ --space-2: 0.8rem;
28
+ --space-3: 1.2rem;
29
+ --space-4: 1.6rem;
30
+ --space-5: 2.0rem;
31
+ --space-6: 2.4rem;
32
+ --space-7: 3.2rem;
33
+ --space-8: 4.0rem;
34
+ --space-9: 4.8rem;
35
+ --space-10: 6.4rem;
36
+
37
+ --headers-margin-top: 1em;
38
+ --headers-margin-bottom: .5em;
39
+ --headers-font-family: var(--font-family);
40
+ --headers-font-weight: 700;
41
+ --headers-font-color: var(--font-color);
42
+
43
+ --h1-font-size: 3.2rem;
44
+ --h2-font-size: 2.4rem;
45
+ --h3-font-size: 2.0rem;
46
+ --h4-font-size: 1.6rem;
47
+ --h5-font-size: 1.4rem;
48
+ --h6-font-size: 1.2rem;
49
+
50
+ --h1-line-height: 1.2;
51
+ --h2-line-height: 1.3;
52
+ --h3-line-height: 1.4;
53
+
54
+ --paragraph-margin: 1em;
55
+
56
+ --figure-margin: 2.5em auto 2em;
57
+ --figcaption-margin-top: .5em;
58
+ --figcaption-font-size: var(--font-size);
59
+ --figcaption-color: #999;
60
+
61
+ --blockquote-margin: 2em 0;
62
+ --blockquote-padding: 1em 2em;
63
+ --blockquote-border: none;
64
+ --blockquote-font-style: italic;
65
+
66
+ --table-padding: .5em .75em;
67
+ --table-border: 1px solid #e4e4e4;
68
+ --table-caption-font-weight: 700;
69
+ --table-header-font-weight: 700;
70
+
71
+ --container-max-width: 160rem;
72
+
73
+ --shadow-1: 0 2px 4px #00000016;
74
+ --shadow-2: 0 4px 8px #00000016;
75
+ --shadow-3: 0 6px 12px #00000016;
76
+ --shadow-4: 0 8px 16px #00000016;
77
+ --shadow-5: 0 10px 20px #00000016;
78
+ --shadow-6: 0 12px 24px #00000016;
79
+ --shadow-7: 0 14px 28px #00000016;
80
+ --shadow-8: 0 16px 32px #00000016;
81
+ --shadow-9: 0 18px 36px #00000016;
82
+ --shadow-10: 0 20px 40px #00000016;
83
+
84
+ --link-color: #0060cc;
85
+ --link-decoration-line: underline;
86
+ --link-decoration-style: solid;
87
+
88
+ /*
89
+ Additional variables and their default values:
90
+ --link-color-hover: var(--link-color);
91
+ --link-color-visited: var(--link-color);
92
+ --link-decoration-line-hover: var(--link-decoration-line-hover, var(--link-decoration-line));
93
+ --link-decoration-style-hover: var(--link-decoration-style-hover, var(--link-decoration-style));
94
+ --link-decoration-thickness: .06em;
95
+ --link-decoration-color: color-mix(in srgb, currentcolor, transparent 75%);
96
+ --link-decoration-color-hover: currentcolor;
97
+ --link-decoration-color-visited: currentcolor;
98
+ --link-underline-offset: .25em;
99
+ --link-transition: all .1s ease-out;
100
+ */
101
+
102
+ --color-primary: #0088ee;
103
+ --color-success: #33c433;
104
+ --color-warning: #ff8800;
105
+ --color-danger: #ee3333;
106
+ --color-error: #ee3333;
107
+ --color-black: #fff;
108
+ --color-white: #000;
109
+ --color-grey: #f4f5f6;
110
+
111
+ /* Required variables */
112
+ --button-height-coeff: 2.5;
113
+ --button-side-padding-coeff: 1.25;
114
+ --button-color: var(--color-grey);
115
+ --button-font-family: var(--font-family);
116
+ --button-font-color: #000;
117
+ --button-font-weight: 400;
118
+ --button-transition: all .1s ease-out;
119
+ --button-font-size: var(--font-size);
120
+ --button-transform: translate(0,0);
121
+ --button-transform-hover: none;
122
+ --button-transform-active: translate(0,.1rem);
123
+ --button-transform-origin: center bottom;
124
+ --button-box-shadow: 0 .1rem .1rem #00000011;
125
+ --button-box-shadow-hover: 0 .1rem .1rem #00000022;
126
+ --button-box-shadow-active: inset 0 0 .1rem #00000011;
127
+ --button-disabled-opacity: .5;
128
+ --button-border-radius: calc(var(--button-font-size) * 0.6);
129
+
130
+ /* Strength of hover (lighten) / active (darken). Override on :root or .button--* to tune. */
131
+ --button-hover-lighten: 10%;
132
+ --button-active-darken: 5%;
133
+
134
+ /*
135
+ Additional variables and their default values:
136
+ --button-height: 4rem;
137
+ --button-side-padding: 2rem;
138
+ --button-hover-lighten: 20% (how much white to mix on hover);
139
+ --button-active-darken: 20% (how much black to mix on active).
140
+ Override --button-color-hover / --button-color-active for custom behaviour (e.g. .button--clear).
141
+ */
142
+
143
+ --dropdown-border-radius: 1.2rem;
144
+ --dropdown-backgroud-color: white;
145
+ --dropdown-box-shadow: var(--shadow-4);
146
+ --dropdown-padding: .8rem;
147
+ --dropdown-max-width: 28rem;
148
+ --dropdown-item-padding: .6rem 2.4rem .6rem 1.2rem;
149
+ --dropdown-item-font-size: inherit;
150
+ --dropdown-item-font-color: black;
151
+ --dropdown-item-font-color-hover: black;
152
+ --dropdown-item-background-color: white;
153
+ --dropdown-item-background-color-hover: var(--color-grey);
154
+ --dropdown-divider-color: var(--color-grey);
155
+
156
+ --form-width: 40rem;
157
+ --form-height-coeff: 2.6;
158
+ --form-side-padding: 1rem;
159
+
160
+ --form-font-size: var(--font-size);
161
+ --form-font-color: #000;
162
+ --form-font-color-readonly: #000;
163
+ --form-font-color-disabled: #666;
164
+ --form-font-color-placeholder: #ccc;
165
+
166
+ --form-border-width: .1rem;
167
+ --form-border-radius: .8rem;
168
+ --form-border-color: #d4d4d4;
169
+ --form-border-color-focused: #8cf;
170
+ --form-border-color-error: #f00;
171
+ --form-border-color-readonly: #ddd;
172
+ --form-border-color-disabled: #ddd;
173
+
174
+ --form-background-color: #fff;
175
+ --form-background-color-readonly: #fafafa;
176
+ --form-background-color-disabled: #f6f6f6;
177
+
178
+ /*
179
+ Additional variables and their default values:
180
+ --form-height: 4rem;
181
+ */
182
+
183
+ --modal-margin-top: 3vw;
184
+ --modal-margin-bottom: 3vw;
185
+ --modal-margin-left: 3vw;
186
+ --modal-margin-right: 3vw;
187
+ --modal-padding-top: clamp(2.5rem, 4vw, 5rem);
188
+ --modal-padding-bottom: clamp(2.5rem, 4vw, 5rem);
189
+ --modal-padding-left: clamp(2.5rem, 4vw, 5rem);
190
+ --modal-padding-right: clamp(2.5rem, 4vw, 5rem);
191
+ --modal-background: #fff;
192
+ --modal-box-shadow: 0 1rem 4rem #00000033;
193
+ --modal-border-radius: 1.6rem;
194
+ --modal-closer-margin: .6rem;
195
+ --modal-closer-area: 4rem;
196
+ --modal-closer-size: 2.4rem;
197
+ --modal-closer-width: .2rem;
198
+ --modal-closer-color: #ccc;
199
+ --modal-closer-color-hover: #f00;
200
+ --modal-overlay-background-color: #00000066;
201
+
202
+ --scroll-scrollbar-size: 6px;
203
+ --scroll-scrollbar-thumb-background: #00000011;
204
+ --scroll-scrollbar-thumb-background-hover: #00000022;
205
+
206
+ --slider-point-color: #ffffff66;
207
+ --slider-point-color-active: #fff;
208
+ --slider-point-size: .3rem;
209
+ --slider-indicators-gap: .3rem;
210
+ --slider-indicators-top: auto;
211
+ --slider-indicators-left: 1.2rem;
212
+ --slider-indicators-right: 1.2rem;
213
+ --slider-indicators-bottom: 1rem;
214
+ --slider-indicators-width: auto;
215
+ --slider-indicators-height: var(--slider-point-size);
216
+ --slider-indicators-init-opacity: 0;
217
+ --slider-object-fit: cover;
218
+ }
219
+
220
+ }
package/src/css/x.css CHANGED
@@ -7,8 +7,16 @@ All right reserved.
7
7
  ----------------------------------------*/
8
8
 
9
9
 
10
- @layer reset, space, typo, links, grid, flex, flow, form, buttons, dropdown, sheets, slider, sticky, modal, scroll, icons, helpers, colors;
10
+ @layer variables, reset, space, typo, links, grid, flex, flow, form, buttons, dropdown, sheets, slider, sticky, modal, scroll, icons, app, helpers, colors;
11
11
 
12
+ @layer app {
13
+ /*
14
+ Фейковый слой, чтобы можно было обернуть в него стили
15
+ приложения без повторного перечисления слоев.
16
+ */
17
+ }
18
+
19
+ @import "../components/x/variables.css";
12
20
  @import "../components/x/reset.css";
13
21
  @import "../components/x/space.css";
14
22
  @import "../components/x/typo.css";