@eqtylab/equality 2.5.0 → 3.1.0

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.
@@ -1,259 +1,265 @@
1
- @layer base {
2
- /* =========================================================
3
- SCOPED PREFLIGHT (kept intact; selectors retargeted)
4
- ========================================================= */
5
-
6
- /* 1) Box model + resets + border-color */
7
- :global(#equality-theme-provider-root),
8
- :global(#equality-theme-provider-root) *,
9
- :global(#equality-theme-provider-root) ::after,
10
- :global(#equality-theme-provider-root) ::before,
11
- :global(#equality-theme-provider-root) ::backdrop,
12
- :global(#equality-theme-provider-root) ::file-selector-button {
13
- box-sizing: border-box;
14
- margin: 0;
15
- padding: 0;
16
- border: 0 solid;
17
- border-color: var(--color-border);
18
- }
1
+ /* =========================================================
2
+ SCOPED PREFLIGHT — CANONICAL SOURCE
3
+
4
+ Edit this file. `theme-preflight-global.css` is generated from it by
5
+ `src/scripts/build-preflight.js`, which swaps `[data-equality-root]` for
6
+ `html`. Run `pnpm build:preflight` after changing anything here.
7
+
8
+ Deliberately carries no `@layer` wrapper: the importer assigns the layer,
9
+ so a consumer can place the reset wherever their cascade needs it.
10
+
11
+ @import '@eqtylab/equality/preflight-scoped.css' layer(base);
12
+ ========================================================= */
13
+
14
+ /* 1) Box model + resets + border-color */
15
+ [data-equality-root],
16
+ [data-equality-root] *,
17
+ [data-equality-root] ::after,
18
+ [data-equality-root] ::before,
19
+ [data-equality-root] ::backdrop,
20
+ [data-equality-root] ::file-selector-button {
21
+ box-sizing: border-box;
22
+ margin: 0;
23
+ padding: 0;
24
+ border: 0 solid;
25
+ border-color: var(--color-border);
26
+ }
19
27
 
20
- /* Cursor for buttons */
21
- :global(#equality-theme-provider-root) button {
22
- cursor: pointer;
23
- }
28
+ /* Cursor for buttons */
29
+ [data-equality-root] button {
30
+ cursor: pointer;
31
+ }
24
32
 
25
- /* Typography + platform defaults */
26
- :global(#equality-theme-provider-root) {
27
- line-height: 1.5;
28
- -webkit-text-size-adjust: 100%;
29
- tab-size: 4;
30
- font-family: var(--font-sans);
31
- -webkit-tap-highlight-color: transparent;
32
- font-synthesis: none;
33
- text-rendering: optimizeLegibility;
34
- -webkit-font-smoothing: antialiased;
35
- -moz-osx-font-smoothing: grayscale;
36
- }
33
+ /* Typography + platform defaults */
34
+ [data-equality-root] {
35
+ line-height: 1.5;
36
+ -webkit-text-size-adjust: 100%;
37
+ tab-size: 4;
38
+ font-family: var(--font-sans);
39
+ -webkit-tap-highlight-color: transparent;
40
+ font-synthesis: none;
41
+ text-rendering: optimizeLegibility;
42
+ -webkit-font-smoothing: antialiased;
43
+ -moz-osx-font-smoothing: grayscale;
44
+ }
37
45
 
38
- /* Horizontal rule */
39
- :global(#equality-theme-provider-root) hr {
40
- height: 0;
41
- color: inherit;
42
- border-top-width: 1px;
43
- }
46
+ /* Horizontal rule */
47
+ [data-equality-root] hr {
48
+ height: 0;
49
+ color: inherit;
50
+ border-top-width: 1px;
51
+ }
44
52
 
45
- /* Abbr */
46
- :global(#equality-theme-provider-root) abbr:where([title]) {
47
- -webkit-text-decoration: underline dotted;
48
- text-decoration: underline dotted;
49
- }
53
+ /* Abbr */
54
+ [data-equality-root] abbr:where([title]) {
55
+ -webkit-text-decoration: underline dotted;
56
+ text-decoration: underline dotted;
57
+ }
50
58
 
51
- /* Headings reset */
52
- :global(#equality-theme-provider-root) h1,
53
- :global(#equality-theme-provider-root) h2,
54
- :global(#equality-theme-provider-root) h3,
55
- :global(#equality-theme-provider-root) h4,
56
- :global(#equality-theme-provider-root) h5,
57
- :global(#equality-theme-provider-root) h6 {
58
- font-size: inherit;
59
- font-weight: inherit;
60
- }
59
+ /* Headings reset */
60
+ [data-equality-root] h1,
61
+ [data-equality-root] h2,
62
+ [data-equality-root] h3,
63
+ [data-equality-root] h4,
64
+ [data-equality-root] h5,
65
+ [data-equality-root] h6 {
66
+ font-size: inherit;
67
+ font-weight: inherit;
68
+ }
61
69
 
62
- /* Links */
63
- :global(#equality-theme-provider-root) a {
64
- color: inherit;
65
- -webkit-text-decoration: inherit;
66
- text-decoration: inherit;
67
- }
70
+ /* Links */
71
+ [data-equality-root] a {
72
+ color: inherit;
73
+ -webkit-text-decoration: inherit;
74
+ text-decoration: inherit;
75
+ }
68
76
 
69
- /* Strong */
70
- :global(#equality-theme-provider-root) b,
71
- :global(#equality-theme-provider-root) strong {
72
- font-weight: bolder;
73
- }
77
+ /* Strong */
78
+ [data-equality-root] b,
79
+ [data-equality-root] strong {
80
+ font-weight: bolder;
81
+ }
74
82
 
75
- /* Code fonts */
76
- :global(#equality-theme-provider-root) code,
77
- :global(#equality-theme-provider-root) kbd,
78
- :global(#equality-theme-provider-root) samp,
79
- :global(#equality-theme-provider-root) pre {
80
- font-family: var(--font-mono), monospace;
81
- font-size: 1em;
82
- }
83
+ /* Code fonts */
84
+ [data-equality-root] code,
85
+ [data-equality-root] kbd,
86
+ [data-equality-root] samp,
87
+ [data-equality-root] pre {
88
+ font-family: var(--font-mono), monospace;
89
+ font-size: 1em;
90
+ }
83
91
 
84
- /* Small */
85
- :global(#equality-theme-provider-root) small {
86
- font-size: 80%;
87
- }
92
+ /* Small */
93
+ [data-equality-root] small {
94
+ font-size: 80%;
95
+ }
88
96
 
89
- /* Sub/Sup */
90
- :global(#equality-theme-provider-root) sub,
91
- :global(#equality-theme-provider-root) sup {
92
- font-size: 75%;
93
- line-height: 0;
94
- position: relative;
95
- vertical-align: baseline;
96
- }
97
- :global(#equality-theme-provider-root) sub {
98
- bottom: -0.25em;
99
- }
100
- :global(#equality-theme-provider-root) sup {
101
- top: -0.5em;
102
- }
97
+ /* Sub/Sup */
98
+ [data-equality-root] sub,
99
+ [data-equality-root] sup {
100
+ font-size: 75%;
101
+ line-height: 0;
102
+ position: relative;
103
+ vertical-align: baseline;
104
+ }
105
+ [data-equality-root] sub {
106
+ bottom: -0.25em;
107
+ }
108
+ [data-equality-root] sup {
109
+ top: -0.5em;
110
+ }
103
111
 
104
- /* Tables */
105
- :global(#equality-theme-provider-root) table {
106
- text-indent: 0;
107
- border-color: inherit;
108
- border-collapse: collapse;
109
- }
112
+ /* Tables */
113
+ [data-equality-root] table {
114
+ text-indent: 0;
115
+ border-color: inherit;
116
+ border-collapse: collapse;
117
+ }
110
118
 
111
- /* Firefox focus */
112
- :global(#equality-theme-provider-root) :-moz-focusring {
113
- outline: auto;
114
- }
119
+ /* Firefox focus */
120
+ [data-equality-root] :-moz-focusring {
121
+ outline: auto;
122
+ }
115
123
 
116
- /* Progress baseline */
117
- :global(#equality-theme-provider-root) progress {
118
- vertical-align: baseline;
119
- }
124
+ /* Progress baseline */
125
+ [data-equality-root] progress {
126
+ vertical-align: baseline;
127
+ }
120
128
 
121
- /* Summary display */
122
- :global(#equality-theme-provider-root) summary {
123
- display: list-item;
124
- }
129
+ /* Summary display */
130
+ [data-equality-root] summary {
131
+ display: list-item;
132
+ }
125
133
 
126
- /* Lists unstyled */
127
- :global(#equality-theme-provider-root) ol,
128
- :global(#equality-theme-provider-root) ul,
129
- :global(#equality-theme-provider-root) menu {
130
- list-style: none;
131
- }
134
+ /* Lists unstyled */
135
+ [data-equality-root] ol,
136
+ [data-equality-root] ul,
137
+ [data-equality-root] menu {
138
+ list-style: none;
139
+ }
132
140
 
133
- /* Replaced elements */
134
- :global(#equality-theme-provider-root) img,
135
- :global(#equality-theme-provider-root) svg,
136
- :global(#equality-theme-provider-root) video,
137
- :global(#equality-theme-provider-root) canvas,
138
- :global(#equality-theme-provider-root) audio,
139
- :global(#equality-theme-provider-root) iframe,
140
- :global(#equality-theme-provider-root) embed,
141
- :global(#equality-theme-provider-root) object {
142
- display: block;
143
- vertical-align: middle;
144
- }
141
+ /* Replaced elements */
142
+ [data-equality-root] img,
143
+ [data-equality-root] svg,
144
+ [data-equality-root] video,
145
+ [data-equality-root] canvas,
146
+ [data-equality-root] audio,
147
+ [data-equality-root] iframe,
148
+ [data-equality-root] embed,
149
+ [data-equality-root] object {
150
+ display: block;
151
+ vertical-align: middle;
152
+ }
145
153
 
146
- /* Media constraints */
147
- :global(#equality-theme-provider-root) img,
148
- :global(#equality-theme-provider-root) video {
149
- max-width: 100%;
150
- height: auto;
151
- }
154
+ /* Media constraints */
155
+ [data-equality-root] img,
156
+ [data-equality-root] video {
157
+ max-width: 100%;
158
+ height: auto;
159
+ }
152
160
 
153
- /* Form element normalizations */
154
- :global(#equality-theme-provider-root) button,
155
- :global(#equality-theme-provider-root) input,
156
- :global(#equality-theme-provider-root) select,
157
- :global(#equality-theme-provider-root) optgroup,
158
- :global(#equality-theme-provider-root) textarea,
159
- :global(#equality-theme-provider-root) ::file-selector-button {
160
- font: inherit;
161
- font-feature-settings: inherit;
162
- font-variation-settings: inherit;
163
- letter-spacing: inherit;
164
- color: inherit;
165
- border-radius: 0;
166
- background-color: transparent;
167
- opacity: 1;
168
- }
161
+ /* Form element normalizations */
162
+ [data-equality-root] button,
163
+ [data-equality-root] input,
164
+ [data-equality-root] select,
165
+ [data-equality-root] optgroup,
166
+ [data-equality-root] textarea,
167
+ [data-equality-root] ::file-selector-button {
168
+ font: inherit;
169
+ font-feature-settings: inherit;
170
+ font-variation-settings: inherit;
171
+ letter-spacing: inherit;
172
+ color: inherit;
173
+ border-radius: 0;
174
+ background-color: transparent;
175
+ opacity: 1;
176
+ }
169
177
 
170
- /* Select optgroup weight */
171
- :global(#equality-theme-provider-root) :where(select:is([multiple], [size])) optgroup {
172
- font-weight: bolder;
173
- }
178
+ /* Select optgroup weight */
179
+ [data-equality-root] :where(select:is([multiple], [size])) optgroup {
180
+ font-weight: bolder;
181
+ }
174
182
 
175
- /* Select optgroup option indent */
176
- :global(#equality-theme-provider-root) :where(select:is([multiple], [size])) optgroup option {
177
- padding-inline-start: 20px;
178
- }
183
+ /* Select optgroup option indent */
184
+ [data-equality-root] :where(select:is([multiple], [size])) optgroup option {
185
+ padding-inline-start: 20px;
186
+ }
179
187
 
180
- /* File button spacing */
181
- :global(#equality-theme-provider-root) ::file-selector-button {
182
- margin-inline-end: 4px;
183
- }
188
+ /* File button spacing */
189
+ [data-equality-root] ::file-selector-button {
190
+ margin-inline-end: 4px;
191
+ }
184
192
 
185
- /* Placeholder */
186
- :global(#equality-theme-provider-root) ::placeholder {
187
- opacity: 1;
188
- }
193
+ /* Placeholder */
194
+ [data-equality-root] ::placeholder {
195
+ opacity: 1;
196
+ }
189
197
 
190
- @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {
191
- :global(#equality-theme-provider-root) ::placeholder {
192
- color: color-mix(in oklab, currentcolor 50%, transparent);
193
- }
198
+ @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {
199
+ [data-equality-root] ::placeholder {
200
+ color: color-mix(in oklab, currentcolor 50%, transparent);
194
201
  }
202
+ }
195
203
 
196
- /* Textarea resize */
197
- :global(#equality-theme-provider-root) textarea {
198
- resize: vertical;
199
- }
204
+ /* Textarea resize */
205
+ [data-equality-root] textarea {
206
+ resize: vertical;
207
+ }
200
208
 
201
- /* WebKit search decoration */
202
- :global(#equality-theme-provider-root) ::-webkit-search-decoration {
203
- -webkit-appearance: none;
204
- }
209
+ /* WebKit search decoration */
210
+ [data-equality-root] ::-webkit-search-decoration {
211
+ -webkit-appearance: none;
212
+ }
205
213
 
206
- /* iOS date/time */
207
- :global(#equality-theme-provider-root) ::-webkit-date-and-time-value {
208
- min-height: 1lh;
209
- text-align: inherit;
210
- }
214
+ /* iOS date/time */
215
+ [data-equality-root] ::-webkit-date-and-time-value {
216
+ min-height: 1lh;
217
+ text-align: inherit;
218
+ }
211
219
 
212
- :global(#equality-theme-provider-root) ::-webkit-datetime-edit {
213
- display: inline-flex;
214
- }
220
+ [data-equality-root] ::-webkit-datetime-edit {
221
+ display: inline-flex;
222
+ }
215
223
 
216
- :global(#equality-theme-provider-root) ::-webkit-datetime-edit-fields-wrapper {
217
- padding: 0;
218
- }
224
+ [data-equality-root] ::-webkit-datetime-edit-fields-wrapper {
225
+ padding: 0;
226
+ }
219
227
 
220
- :global(#equality-theme-provider-root) ::-webkit-datetime-edit,
221
- :global(#equality-theme-provider-root) ::-webkit-datetime-edit-year-field,
222
- :global(#equality-theme-provider-root) ::-webkit-datetime-edit-month-field,
223
- :global(#equality-theme-provider-root) ::-webkit-datetime-edit-day-field,
224
- :global(#equality-theme-provider-root) ::-webkit-datetime-edit-hour-field,
225
- :global(#equality-theme-provider-root) ::-webkit-datetime-edit-minute-field,
226
- :global(#equality-theme-provider-root) ::-webkit-datetime-edit-second-field,
227
- :global(#equality-theme-provider-root) ::-webkit-datetime-edit-millisecond-field,
228
- :global(#equality-theme-provider-root) ::-webkit-datetime-edit-meridiem-field {
229
- padding-block: 0;
230
- }
228
+ [data-equality-root] ::-webkit-datetime-edit,
229
+ [data-equality-root] ::-webkit-datetime-edit-year-field,
230
+ [data-equality-root] ::-webkit-datetime-edit-month-field,
231
+ [data-equality-root] ::-webkit-datetime-edit-day-field,
232
+ [data-equality-root] ::-webkit-datetime-edit-hour-field,
233
+ [data-equality-root] ::-webkit-datetime-edit-minute-field,
234
+ [data-equality-root] ::-webkit-datetime-edit-second-field,
235
+ [data-equality-root] ::-webkit-datetime-edit-millisecond-field,
236
+ [data-equality-root] ::-webkit-datetime-edit-meridiem-field {
237
+ padding-block: 0;
238
+ }
231
239
 
232
- :global(#equality-theme-provider-root) ::-webkit-calendar-picker-indicator {
233
- line-height: 1;
234
- }
240
+ [data-equality-root] ::-webkit-calendar-picker-indicator {
241
+ line-height: 1;
242
+ }
235
243
 
236
- /* Firefox invalid */
237
- :global(#equality-theme-provider-root) :-moz-ui-invalid {
238
- box-shadow: none;
239
- }
244
+ /* Firefox invalid */
245
+ [data-equality-root] :-moz-ui-invalid {
246
+ box-shadow: none;
247
+ }
240
248
 
241
- /* Button appearances */
242
- :global(#equality-theme-provider-root) button,
243
- :global(#equality-theme-provider-root)
244
- input:where([type='button'], [type='reset'], [type='submit']),
245
- :global(#equality-theme-provider-root) ::file-selector-button {
246
- appearance: button;
247
- }
249
+ /* Button appearances */
250
+ [data-equality-root] button,
251
+ [data-equality-root] input:where([type='button'], [type='reset'], [type='submit']),
252
+ [data-equality-root] ::file-selector-button {
253
+ appearance: button;
254
+ }
248
255
 
249
- /* Safari spin buttons */
250
- :global(#equality-theme-provider-root) ::-webkit-inner-spin-button,
251
- :global(#equality-theme-provider-root) ::-webkit-outer-spin-button {
252
- height: auto;
253
- }
256
+ /* Safari spin buttons */
257
+ [data-equality-root] ::-webkit-inner-spin-button,
258
+ [data-equality-root] ::-webkit-outer-spin-button {
259
+ height: auto;
260
+ }
254
261
 
255
- /* Hidden */
256
- :global(#equality-theme-provider-root) [hidden]:where(:not([hidden='until-found'])) {
257
- display: none !important;
258
- }
262
+ /* Hidden */
263
+ [data-equality-root] [hidden]:where(:not([hidden='until-found'])) {
264
+ display: none !important;
259
265
  }
@@ -10,6 +10,6 @@
10
10
  @import './tokens.css';
11
11
 
12
12
  @import './theme-base.css';
13
- @import './theme-preflight-scoped.css';
13
+ @import './theme-preflight-scoped.css' layer(base);
14
14
  @import './theme-components.css';
15
15
  @import './theme-utilities.css';