aliascss 1.3.5 → 1.3.7
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/dist/aliascss.js +1 -1
- package/lib/compilers/color.js +22 -3
- package/lib/config.d.ts +1 -0
- package/lib/config.js +32 -30
- package/lib/css-properties-all.js +16 -15
- package/lib/custom-css-compilers.js +135 -141
- package/lib/prebuild.d.ts +3 -7
- package/lib/prebuild.js +192 -213
- package/lib/prefix/PseudoPrefixNew.js +7 -3
- package/lib/prefix/attribute-selector.js +2 -2
- package/lib/prefix/element-selector.js +16 -15
- package/lib/prefix/pseudoSelectorNew.js +3 -3
- package/lib/prefix/responsive.js +14 -0
- package/lib/returnStatement.js +4 -2
- package/lib/static/customColorsRA.d.ts +3 -0
- package/lib/static/customColorsRA.js +82 -0
- package/lib/static/customColorsRadix.d.ts +1 -3538
- package/lib/static/customColorsRadix.js +492 -323
- package/lib/static/customStaticClassNames.js +149 -121
- package/package.json +2 -4
package/lib/prebuild.d.ts
CHANGED
|
@@ -31,11 +31,7 @@ declare const _default: {
|
|
|
31
31
|
type: string;
|
|
32
32
|
statement: string;
|
|
33
33
|
};
|
|
34
|
-
'x-
|
|
35
|
-
type: string;
|
|
36
|
-
statement: string;
|
|
37
|
-
};
|
|
38
|
-
'x-screen': {
|
|
34
|
+
'x-import-tokens': {
|
|
39
35
|
type: string;
|
|
40
36
|
statement: string;
|
|
41
37
|
};
|
|
@@ -131,11 +127,11 @@ declare const _default: {
|
|
|
131
127
|
type: string;
|
|
132
128
|
statement: string;
|
|
133
129
|
};
|
|
134
|
-
'x-
|
|
130
|
+
'x-import-utils-1': {
|
|
135
131
|
type: string;
|
|
136
132
|
statement: string;
|
|
137
133
|
};
|
|
138
|
-
'x-
|
|
134
|
+
'x-import-vars-dark': {
|
|
139
135
|
type: string;
|
|
140
136
|
statement: string;
|
|
141
137
|
};
|
package/lib/prebuild.js
CHANGED
|
@@ -1,47 +1,4 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
// ...animation,
|
|
3
|
-
// :Base component styles
|
|
4
|
-
// '@comp':{
|
|
5
|
-
// type:'statement',
|
|
6
|
-
// statement:`` ,
|
|
7
|
-
// },
|
|
8
|
-
// 'x-bg-1':{
|
|
9
|
-
// 'type':'statement',
|
|
10
|
-
// statement:`bg-lg-135deg-1e1b4b-0f172a
|
|
11
|
-
// --bf[cont,pa,flex-center,w-130px,h-130px,bgc-rgba-99-102-241-0.25,br-50p,t--30px,l--30px,backdrop-filter-blur-12px,bxs-0px-0px-40px-rgba-99-102-241-0.3]
|
|
12
|
-
// --af[cont,pa,w-100px,h-100px,br-50px,bgc-rgba-244-114-182-0.2,btm--20px,r--20px,b-1px-s-rgba-255-255-255-0.1,bxs-0px-0px-30px-rgba-244-114-183-0.3]`
|
|
13
|
-
// },
|
|
14
|
-
// 'x-bg-cyberpunk-grid':{
|
|
15
|
-
// 'type':'raw',
|
|
16
|
-
// statement:`
|
|
17
|
-
// .x-bg-cyberpunk-grid {
|
|
18
|
-
// --x-bg-cyberpunk-grid-color:#00001a;
|
|
19
|
-
// --x-bg-cyberpunk-grid-line-color:0 255 200;
|
|
20
|
-
// background: var(--x-bg-cyberpunk-grid-color);
|
|
21
|
-
// perspective: 400px;
|
|
22
|
-
// }
|
|
23
|
-
// .x-bg-cyberpunk-grid::before {
|
|
24
|
-
// content: '';
|
|
25
|
-
// position: absolute;
|
|
26
|
-
// width: 200%;
|
|
27
|
-
// height: 200%;
|
|
28
|
-
// top: 0;
|
|
29
|
-
// left: -50%;
|
|
30
|
-
// background-image:
|
|
31
|
-
// linear-gradient(rgba(var(--x-bg-cyberpunk-grid-line-color) / 0.3) 1px, transparent 1px),
|
|
32
|
-
// linear-gradient(90deg, rgba(var(--x-bg-cyberpunk-grid-line-color) / 0.3) 1px, transparent 1px);
|
|
33
|
-
// background-size: 30px 30px;
|
|
34
|
-
// transform: rotateX(55deg);
|
|
35
|
-
// transform-origin: 50% 0%;
|
|
36
|
-
// }
|
|
37
|
-
// .x-bg-cyberpunk-grid::after {
|
|
38
|
-
// content: '';
|
|
39
|
-
// position: absolute;
|
|
40
|
-
// inset: 0;
|
|
41
|
-
// background:
|
|
42
|
-
// linear-gradient(180deg, var(--x-bg-cyberpunk-grid-color) 0%, transparent 40%, var(--x-bg-cyberpunk-grid-color) 100%),
|
|
43
|
-
// radial-gradient(ellipse at 50% 0%, rgba(var(--x-bg-cyberpunk-grid-line-color) / 0.25) 0%, transparent 60%);
|
|
44
|
-
// }`},
|
|
45
2
|
'x-btn': {
|
|
46
3
|
type: 'statement',
|
|
47
4
|
statement: `@base-all-unset
|
|
@@ -82,174 +39,196 @@ export default {
|
|
|
82
39
|
statement: `@layer reset, base;
|
|
83
40
|
@layer reset{*,::after,::before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;tab-size:4;font-family:--theme(--default-font-family,ui-sans-serif,system-ui,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol','Noto Color Emoji');font-feature-settings:--theme(--default-font-feature-settings,normal);font-variation-settings:--theme(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:--theme(--default-mono-font-family, ui-monospace,SFMono-Regular,Menlo, Monaco,Consolas,'Liberation Mono','Courier New',monospace);font-feature-settings:--theme(--default-mono-font-feature-settings,normal);font-variation-settings:--theme(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea,::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type='button'],[type='reset'],[type='submit']),::file-selector-button{appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden='until-found'])){display:none!important}}`
|
|
84
41
|
},
|
|
85
|
-
//
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
42
|
+
//
|
|
43
|
+
'x-import-tokens': {
|
|
44
|
+
type: 'raw',
|
|
45
|
+
statement: `
|
|
46
|
+
:root {
|
|
47
|
+
--text-white:#ffffffff;
|
|
48
|
+
--text-black:#00000000;
|
|
49
|
+
--text-color:initial;
|
|
50
|
+
--text-hover-color:initial;
|
|
51
|
+
--text-pressed-color:initial;
|
|
52
|
+
--text-disabled-color:initial;
|
|
53
|
+
--text-active-color:initial;
|
|
54
|
+
--text-link-color:initial;
|
|
55
|
+
--text-visited-color:initial;
|
|
56
|
+
--bg-color:initial;
|
|
57
|
+
--bg-hover-color:initial;
|
|
58
|
+
--bg-disabled-color:initial;
|
|
59
|
+
--bg-pressed-color:initial;
|
|
60
|
+
--bg--active-color:initial;
|
|
61
|
+
|
|
62
|
+
--border-color:initial;
|
|
63
|
+
--border-hover-color:initial;
|
|
64
|
+
--border-disabled-color:initial;
|
|
65
|
+
--border-pressed-color:initial;
|
|
66
|
+
--border--active-color:initial;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@media (prefers-color-scheme: dark) {
|
|
70
|
+
:root{
|
|
71
|
+
--text-white:#00000000;
|
|
72
|
+
--text-black:#fffffff;
|
|
73
|
+
--text-color:initial;
|
|
74
|
+
--text-hover-color:initial;
|
|
75
|
+
--text-pressed-color:initial;
|
|
76
|
+
--text-disabled-color:initial;
|
|
77
|
+
--text-active-color:initial;
|
|
78
|
+
--text-link-color:initial;
|
|
79
|
+
--text-visited-color:initial;
|
|
80
|
+
--text-color:initial;
|
|
81
|
+
|
|
82
|
+
--bg-color:initial;
|
|
83
|
+
--bg-hover-color:initial;
|
|
84
|
+
--bg-disabled-color:initial;
|
|
85
|
+
--bg-pressed-color:initial;
|
|
86
|
+
--bg--active-color:initial;
|
|
87
|
+
|
|
88
|
+
--border-color:initial;
|
|
89
|
+
--border-hover-color:initial;
|
|
90
|
+
--border-disabled-color:initial;
|
|
91
|
+
--border-pressed-color:initial;
|
|
92
|
+
--border--active-color:initial;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.x-import-semantics-vars{
|
|
97
|
+
color:var(--text-color)
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
:root{
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
/* Fluid Display Scale */
|
|
104
|
+
--display-xs: clamp(1.125rem, calc(1rem + 0.625vw), 1.5rem); /* Scales from 18px to 24px */
|
|
105
|
+
--display-sm: clamp(1.25rem, calc(1.0417rem + 1.0417vw), 1.875rem); /* Scales from 20px to 30px */
|
|
106
|
+
--display-md: clamp(1.5rem, calc(1.25rem + 1.25vw), 2.25rem); /* Scales from 24px to 36px */
|
|
107
|
+
--display-lg: clamp(1.875rem, calc(1.5rem + 1.875vw), 3rem); /* Scales from 30px to 48px */
|
|
108
|
+
--display-xl: clamp(2.25rem, calc(1.75rem + 2.5vw), 3.75rem); /* Scales from 36px to 60px */
|
|
109
|
+
--display-2xl: clamp(2.5rem, calc(1.8333rem + 3.3333vw), 4.5rem); /* Scales from 40px to 72px */
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
/* Typography scale — fluid */
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
--text-xs: clamp(0.75rem, calc(0.7rem + 0.25vw), 0.875rem);
|
|
116
|
+
--text-sm: clamp(0.875rem, calc(0.8rem + 0.35vw), 1rem);
|
|
117
|
+
--text-base: clamp(1rem, calc(0.95rem + 0.25vw), 1.125rem);
|
|
118
|
+
--text-lg: clamp(1.125rem, calc(1rem + 0.75vw), 1.5rem);
|
|
119
|
+
--text-xl: clamp(1.5rem, calc(1.2rem + 1.25vw), 2.25rem);
|
|
120
|
+
--text-2xl: clamp(2rem, calc(1.2rem + 2.5vw), 3.5rem);
|
|
121
|
+
--text-3xl: clamp(2.5rem, calc(1rem + 4vw), 5rem);
|
|
122
|
+
--text-hero: clamp(3rem, calc(0.5rem + 7vw), 8rem);
|
|
123
|
+
|
|
124
|
+
/* Base spacing unit */
|
|
125
|
+
|
|
126
|
+
--space: var(--space-base,0.25rem);
|
|
127
|
+
|
|
128
|
+
/* Spacing scale */
|
|
129
|
+
--space-1: calc(var(--space) * 1);
|
|
130
|
+
--space-2: calc(var(--space) * 2);
|
|
131
|
+
--space-3: calc(var(--space) * 3);
|
|
132
|
+
--space-4: calc(var(--space) * 4);
|
|
133
|
+
--space-5: calc(var(--space) * 5);
|
|
134
|
+
--space-6: calc(var(--space) * 6);
|
|
135
|
+
--space-8: calc(var(--space) * 8);
|
|
136
|
+
--space-10: calc(var(--space) * 10);
|
|
137
|
+
--space-12: calc(var(--space) * 12);
|
|
138
|
+
--space-16: calc(var(--space) * 16);
|
|
139
|
+
--space-20: calc(var(--space) * 20);
|
|
140
|
+
--space-24: calc(var(--space) * 24);
|
|
141
|
+
--space-32: calc(var(--space) * 32);
|
|
142
|
+
|
|
143
|
+
/* Border radius */
|
|
144
|
+
--radius-sm: 0.375rem;
|
|
145
|
+
--radius-md: 0.5rem;
|
|
146
|
+
--radius-base: 0.5rem;
|
|
147
|
+
--radius-lg: 0.75rem;
|
|
148
|
+
--radius-xl: 1rem;
|
|
149
|
+
--radius-2xl: 1.5rem;
|
|
150
|
+
--radius-full: 9999px;
|
|
151
|
+
|
|
152
|
+
/* Colors — Light */
|
|
153
|
+
--color-bg: #f5f6fa;
|
|
154
|
+
--color-surface: #ffffff;
|
|
155
|
+
--color-surface-2: #f8f9fc;
|
|
156
|
+
--color-surface-offset: #eef0f6;
|
|
157
|
+
--color-surface-offset-2: #e4e7f0;
|
|
158
|
+
--color-surface-dynamic: #d9dde8;
|
|
159
|
+
--color-divider: #d0d4e0;
|
|
160
|
+
--color-border: #c4c9d8;
|
|
161
|
+
|
|
162
|
+
--color-text: #111827;
|
|
163
|
+
--color-text-muted: #4b5563;
|
|
164
|
+
--color-text-faint: #9ca3af;
|
|
165
|
+
--color-text-inverse: #f9fafb;
|
|
166
|
+
|
|
167
|
+
--color-primary: #0a4f6b;
|
|
168
|
+
/* --color-primary: red; */
|
|
169
|
+
--color-primary-hover: #063a52;
|
|
170
|
+
--color-primary-active: #04283a;
|
|
171
|
+
--color-primary-highlight: #cce3ed;
|
|
172
|
+
--color-primary-light: #e8f4f8;
|
|
173
|
+
|
|
174
|
+
--color-accent: #d97706;
|
|
175
|
+
--color-accent-hover: #b45309;
|
|
176
|
+
--color-accent-light: #fef3c7;
|
|
177
|
+
|
|
178
|
+
--color-success: #166534;
|
|
179
|
+
--color-success-bg: #dcfce7;
|
|
180
|
+
--color-success-highlight: #dcfce7;
|
|
181
|
+
|
|
182
|
+
--color-error: #991b1b;
|
|
183
|
+
--color-error-bg: #fee2e2;
|
|
184
|
+
|
|
185
|
+
--color-gold: #d19900;
|
|
186
|
+
--color-gold-bg: #fef9e7;
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
/* Base shadow color (Lightness Chroma Hue) */
|
|
191
|
+
|
|
192
|
+
--shadow-color: 0.2 0.03 245;
|
|
193
|
+
|
|
194
|
+
/* Shadows */
|
|
195
|
+
|
|
196
|
+
--shadow-sm: 0 1px 3px oklch(var(--shadow-color) / 0.08);
|
|
197
|
+
--shadow-md: 0 4px 14px oklch(var(--shadow-color) / 0.10);
|
|
198
|
+
--shadow-lg: 0 12px 40px oklch(var(--shadow-color) / 0.14);
|
|
199
|
+
--shadow-xl: 0 24px 60px oklch(var(--shadow-color) / 0.18);
|
|
200
|
+
|
|
201
|
+
/* subtle: Subtle contact + slight lift (Great for buttons and cards) */
|
|
202
|
+
--shadow-subtle:
|
|
203
|
+
0 1px 2px oklch(var(--shadow-color) / 0.06),
|
|
204
|
+
0 1px 4px oklch(var(--shadow-color) / 0.08);
|
|
205
|
+
|
|
206
|
+
/* light: Defined contact + medium spread (Great for dropdowns) */
|
|
207
|
+
--shadow-light:
|
|
208
|
+
0 2px 4px oklch(var(--shadow-color) / 0.04),
|
|
209
|
+
0 6px 16px oklch(var(--shadow-color) / 0.10);
|
|
210
|
+
|
|
211
|
+
/* soft: Soft contact + ambient mid + wide directional (Great for modals) */
|
|
212
|
+
--shadow-soft:
|
|
213
|
+
0 4px 8px oklch(var(--shadow-color) / 0.03),
|
|
214
|
+
0 12px 24px oklch(var(--shadow-color) / 0.06),
|
|
215
|
+
0 20px 48px oklch(var(--shadow-color) / 0.12);
|
|
216
|
+
|
|
217
|
+
/* hard: Deep contact + soft ambient + massive spread (Great for floating palettes) */
|
|
218
|
+
--shadow-hard:
|
|
219
|
+
0 6px 12px oklch(var(--shadow-color) / 0.03),
|
|
220
|
+
0 16px 32px oklch(var(--shadow-color) / 0.06),
|
|
221
|
+
0 32px 80px oklch(var(--shadow-color) / 0.14);
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
/* Layout */
|
|
227
|
+
--content-narrow: 640px;
|
|
228
|
+
--content-default: 960px;
|
|
229
|
+
--content-wide: 1200px;
|
|
230
|
+
}
|
|
231
|
+
`
|
|
253
232
|
},
|
|
254
233
|
'x-divider-text': {
|
|
255
234
|
type: 'statement',
|
|
@@ -310,7 +289,7 @@ export default {
|
|
|
310
289
|
[class~=x-menu-open][--af-tf-r-45deg,--af-t-50p,--bf-tf-r--45deg,--bf-t50p,--af-tn-all-0d5s,--bf-tn-all-0d5s]
|
|
311
290
|
[x-menu-open][--af-tf-r-45deg,--af-t-50p,--bf-tf-r--45deg,--bf-t50p,--af-tn-all-0d5s,--bf-tn-all-0d5s]`
|
|
312
291
|
},
|
|
313
|
-
'x-
|
|
292
|
+
'x-import-utils-1': {
|
|
314
293
|
type: 'statement',
|
|
315
294
|
statement: `
|
|
316
295
|
[c-gray-900,dark-c-grayDark-50]--as-text-primary
|
|
@@ -385,7 +364,7 @@ export default {
|
|
|
385
364
|
[background-color-success-600,dark-background-color-success-600]--as-bg-success-solid
|
|
386
365
|
`,
|
|
387
366
|
},
|
|
388
|
-
'x-
|
|
367
|
+
'x-import-vars-dark': {
|
|
389
368
|
type: 'statement',
|
|
390
369
|
statement: `
|
|
391
370
|
--text-primary:--gray-50
|
|
@@ -59,6 +59,7 @@ const prefix = {
|
|
|
59
59
|
'--ge': '::grammar-error',
|
|
60
60
|
'--has': ':has', // --has
|
|
61
61
|
'--hs': ':has', // -hs
|
|
62
|
+
'--Has': ' :has', // --has
|
|
62
63
|
'--hover-after': ':hover::after', // -haf
|
|
63
64
|
'--haf': ':hover::after', // -haf
|
|
64
65
|
'--hover-before': ':hover::before', // -hbf
|
|
@@ -74,7 +75,8 @@ const prefix = {
|
|
|
74
75
|
'--ind': ':indeterminate', // idt
|
|
75
76
|
'--invalid': ':invalid', // -in
|
|
76
77
|
'--inv': ':invalid', // -in
|
|
77
|
-
'--is': ':is',
|
|
78
|
+
'--is': ' :is',
|
|
79
|
+
'--Is': ':is',
|
|
78
80
|
// '--is':':is',
|
|
79
81
|
'--lang': ':lang', // -ln
|
|
80
82
|
'--lan': ':lan', // -ln
|
|
@@ -143,7 +145,9 @@ const prefix = {
|
|
|
143
145
|
'--visited': ':visited', // -vi
|
|
144
146
|
'--vi': ':visited', // -vi
|
|
145
147
|
'--v': ':visited', // -vi
|
|
146
|
-
'--where': ':where',
|
|
147
|
-
'--w': ':where'
|
|
148
|
+
'--where': ' :where',
|
|
149
|
+
'--w': ' :where',
|
|
150
|
+
'--Where': ':where',
|
|
151
|
+
'--W': ':where'
|
|
148
152
|
};
|
|
149
153
|
export default prefix;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const attribute = {
|
|
2
|
-
test: /^[-,]?[\[][a-zA-Z0-9-_:]+([~*$^]?[=][a-zA-Z0-9-_:/.]+)?[\]]/,
|
|
2
|
+
test: /^[-,_]?[\[][a-zA-Z0-9-_:]+([~*$^]?[=][a-zA-Z0-9-_:/.]+)?[\]]/,
|
|
3
3
|
process(className) {
|
|
4
4
|
const match = className.match(this.test);
|
|
5
5
|
if (match) {
|
|
@@ -9,7 +9,7 @@ const attribute = {
|
|
|
9
9
|
const result = attr.replace(attrSplit, attrSplit.replace(/:/g, '\\:'))
|
|
10
10
|
// .replace(/^([-]?[\[][a-z0-9-_:]+)([~*$^]?[=][a-z0-9-_:/.]+)?[\]]/,(m,s,b)=>s.replace(/\:/g,'\:')+b+']')
|
|
11
11
|
.replace(/-(eql|equal)-/, '=').replace(/[=]([a-zA-Z0-9-_:/.]+)[\]]/, '="$1"]').replace(/^[-_]/, ""); // replace(/([\[|\]])/g,'\\$1').replace(/([=])/g,'\\$1');
|
|
12
|
-
return [className.replace(attr, ''), result];
|
|
12
|
+
return [className.replace(attr, ''), /^[_]/.test(className) ? ' ' + result : result];
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -4,21 +4,22 @@ const element = {
|
|
|
4
4
|
const match = className.match(this.test);
|
|
5
5
|
if (match) {
|
|
6
6
|
const alias = match[0];
|
|
7
|
-
if (
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
7
|
+
if (match)
|
|
8
|
+
if (alias) {
|
|
9
|
+
const result = alias
|
|
10
|
+
.replace('next', ' + ')
|
|
11
|
+
.replace('child', ' > ')
|
|
12
|
+
.replace('siblings', ' ~')
|
|
13
|
+
.replace(/____/g, ' ~ ')
|
|
14
|
+
.replace(/___/g, ' + ')
|
|
15
|
+
.replace(/__/g, ' > ')
|
|
16
|
+
.replace(/_/g, ' ')
|
|
17
|
+
.replace(/[\s]all/, ' * ')
|
|
18
|
+
.replace(/[\s](dot)/g, (e, a) => { return ' .' + a.toLowerCase(); })
|
|
19
|
+
// .replace(/[\s]([A-Z])/g, (e, a) => { return ' .' + a.toLowerCase();})
|
|
20
|
+
.replace(/[\s]+/g, " ").trim();
|
|
21
|
+
return [className.replace(alias, (/[^_][_]$/.test(alias) ? '_' : '')), ' ' + result];
|
|
22
|
+
}
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
25
|
};
|
|
@@ -8,7 +8,7 @@ export default function PseudoEleStateNew(data) {
|
|
|
8
8
|
return null;
|
|
9
9
|
const matchAndFunc = [
|
|
10
10
|
{
|
|
11
|
-
match: /^-([-]?(not|has|is|where|n|hs|w))\((.+)\)/,
|
|
11
|
+
match: /^-([-]?(not|has|Has|is|Is|where|Where|n|hs|w|W))\((.+)\)/,
|
|
12
12
|
func(value) {
|
|
13
13
|
const matched = value.match(this.match);
|
|
14
14
|
const newData = matched === null || matched === void 0 ? void 0 : matched[3];
|
|
@@ -51,8 +51,8 @@ export default function PseudoEleStateNew(data) {
|
|
|
51
51
|
// console.log(data,cn,alias,mch)
|
|
52
52
|
return [cn, `${alias}(${cont})`];
|
|
53
53
|
}
|
|
54
|
-
else if (/(^-(-not|-has|-is|-where|-n|-hs|-w|-is)[-_])/.test(data)) {
|
|
55
|
-
const mch = data.match(/(^-(-not|-has|-is|-where|-n|-hs|-w|-is)([_-]+[a-zA-Z0-9\.,]+)(?=[-|_]))/);
|
|
54
|
+
else if (/(^-(-not|-has|-Has|-is|-Is|-where|-Where|-n|-hs|-w|-W|-is)[-_])/.test(data)) {
|
|
55
|
+
const mch = data.match(/(^-(-not|-has|-Has|-is|-Is|-where|-Where|-n|-hs|-w|-W|-is)([_-]+[a-zA-Z0-9\.,]+)(?=[-|_]))/);
|
|
56
56
|
const cn = (mch === null || mch === void 0 ? void 0 : mch[1]) ? data.replace(mch[1], '') : '';
|
|
57
57
|
const alias = (mch === null || mch === void 0 ? void 0 : mch[2]) ? prefix['-' + mch[2].replace(/-$/, '')] : '';
|
|
58
58
|
const cont = (_a = PseudoEleStateNew((mch === null || mch === void 0 ? void 0 : mch[3]) + '-dn')) === null || _a === void 0 ? void 0 : _a[1];
|
package/lib/prefix/responsive.js
CHANGED
|
@@ -13,6 +13,20 @@ const media = {
|
|
|
13
13
|
'@container-lg': '@container (min-width : 992px)',
|
|
14
14
|
'@container-xl': '@container (min-width : 1200px)',
|
|
15
15
|
'@container-2xl': '@container (min-width : 1408px)',
|
|
16
|
+
'@forced-color-active': '@media (forced-colors: active)',
|
|
17
|
+
'@fca': '@media (forced-colors: active)',
|
|
18
|
+
'@standalone': '@media (display-mode: standalone)',
|
|
19
|
+
'@browser': '@media (display-mode: browser)',
|
|
20
|
+
'@short-height': '@media (max-height: 600px)',
|
|
21
|
+
'@xsh': '@media (max-height: 600px)',
|
|
22
|
+
'@p3': '@media (color-gamut: p3)',
|
|
23
|
+
'@motion-reduce': '@media (prefers-reduced-motion: reduce)',
|
|
24
|
+
'@mouse': '@media (hover: hover) and (pointer: fine)',
|
|
25
|
+
'@touch': '@media (hover: none) and (pointer: coarse)',
|
|
26
|
+
'@resolution-lg': '@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi)',
|
|
27
|
+
'@resolution-xl': '@media (-webkit-min-device-pixel-ratio: 3), (min-resolution: 288dpi)',
|
|
28
|
+
'@contrast-more': '@media (prefers-contrast: more)',
|
|
29
|
+
'@data-reduce': '@media (prefers-reduced-data: reduce)',
|
|
16
30
|
xs: '@media (max-width : 576px)',
|
|
17
31
|
'@xs': '@media (max-width : 576px)',
|
|
18
32
|
sm: '@media (min-width : 576px)',
|