@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.
@@ -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,9 @@ 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, helpers, colors;
11
11
 
12
+ @import "../components/x/variables.css";
12
13
  @import "../components/x/reset.css";
13
14
  @import "../components/x/space.css";
14
15
  @import "../components/x/typo.css";
@@ -187,6 +188,14 @@ All right reserved.
187
188
  .br100 (s,m,l,xl)
188
189
  .sh[0-10] (s,m,l,xl)
189
190
  .o[0-10] (s,m,l,xl)
191
+ .mono
192
+ .italic
193
+ .strike
194
+ .fs[10-19] step 1 (m,l,xl) - size in rem - 1.0, 1.1, 1.2, ..., 1.9
195
+ .fs[20-64] step 2 (m,l,xl) - size in rem - 2.0, 2.2, 2.4, ..., 6.4
196
+ .fw[100-900] step 100 (m,l,xl)
197
+ .ls[0-4] (m,l,xl)
198
+ .lh[0-9] (m,l,xl) - values: 1.0-1.9
190
199
  .no-print
191
200
  */
192
201
 
@@ -222,12 +231,4 @@ All right reserved.
222
231
 
223
232
  /*
224
233
  .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
234
  */