@alacris/ui 0.2.3 → 0.2.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/README.md +3 -3
- package/package.json +1 -1
- package/src/components/ui-text-field.js +21 -20
package/README.md
CHANGED
|
@@ -47,9 +47,9 @@ The published package is plain ESM. Point an import map at a pinned CDN build of
|
|
|
47
47
|
{
|
|
48
48
|
"imports": {
|
|
49
49
|
"@alacris/core": "https://cdn.jsdelivr.net/npm/@alacris/core@0.11.1/dist/alacris.js",
|
|
50
|
-
"@alacris/ui": "https://cdn.jsdelivr.net/npm/@alacris/ui@0.2.
|
|
51
|
-
"@alacris/ui/theme": "https://cdn.jsdelivr.net/npm/@alacris/ui@0.2.
|
|
52
|
-
"@alacris/ui/components/": "https://cdn.jsdelivr.net/npm/@alacris/ui@0.2.
|
|
50
|
+
"@alacris/ui": "https://cdn.jsdelivr.net/npm/@alacris/ui@0.2.4/src/index.js",
|
|
51
|
+
"@alacris/ui/theme": "https://cdn.jsdelivr.net/npm/@alacris/ui@0.2.4/src/theme/index.js",
|
|
52
|
+
"@alacris/ui/components/": "https://cdn.jsdelivr.net/npm/@alacris/ui@0.2.4/src/components/"
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
</script>
|
package/package.json
CHANGED
|
@@ -222,21 +222,22 @@ const styles = css`
|
|
|
222
222
|
.filled.has-label textarea { padding-top: ${sys.space(7)}; }
|
|
223
223
|
.with-leading.multiline .field { padding-inline-start: ${sys.space(4)}; }
|
|
224
224
|
.with-leading.multiline textarea { padding-inline-start: 0; }
|
|
225
|
-
/* A number field's
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
sitting on the
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
225
|
+
/* A number field's spin buttons are laid out at the inline end of the
|
|
226
|
+
input's *content* box rather than at the edge of the field. That is the
|
|
227
|
+
opposite of what it looks like, and it is why the obvious fix makes
|
|
228
|
+
things worse: padding the input to reserve a lane for them moves the end
|
|
229
|
+
of the content box inward and takes the buttons with it, so they land
|
|
230
|
+
further onto the label than they started. That is what shipped in 0.2.3
|
|
231
|
+
— a chevron sitting on the "n" of "Min", clipped to a single arrow —
|
|
232
|
+
and it was a regression, not the original complaint.
|
|
233
|
+
|
|
234
|
+
They cannot be moved out of the way either: margin-inline-end on the
|
|
235
|
+
pseudo-element is ignored. So they are left where the browser puts them,
|
|
236
|
+
at the end of the field where there is already room, and only the label
|
|
237
|
+
and the legend are shortened, so a long one ellipsises before it reaches
|
|
238
|
+
the buttons rather than sliding underneath them. appearance:none does
|
|
239
|
+
not help here: it removes the field's own chrome and leaves the
|
|
240
|
+
::-webkit-*-spin-button alone, which is why this needs saying. */
|
|
240
241
|
.numeric .label {
|
|
241
242
|
max-inline-size: calc(100% - ${sys.space(4)} - ${t.stepperWidth});
|
|
242
243
|
overflow: hidden;
|
|
@@ -246,15 +247,15 @@ const styles = css`
|
|
|
246
247
|
.numeric legend { max-inline-size: calc(100% - ${t.stepperWidth}); }
|
|
247
248
|
.numeric input::-webkit-outer-spin-button,
|
|
248
249
|
.numeric input::-webkit-inner-spin-button {
|
|
249
|
-
/*
|
|
250
|
-
|
|
251
|
-
|
|
250
|
+
/* Nudged off the text rather than sitting tight against it, and always
|
|
251
|
+
visible: a stepper that only appears on hover is a control nobody
|
|
252
|
+
knows is there. */
|
|
252
253
|
margin: 0;
|
|
253
254
|
margin-inline-start: ${sys.space(2)};
|
|
254
255
|
opacity: 1;
|
|
255
256
|
}
|
|
256
|
-
/* Firefox draws no buttons at all unless asked
|
|
257
|
-
|
|
257
|
+
/* Firefox draws no buttons at all unless asked. Asking for them makes the
|
|
258
|
+
two engines agree about what a number field looks like. */
|
|
258
259
|
@supports (-moz-appearance: number-input) {
|
|
259
260
|
.numeric input { -moz-appearance: number-input; }
|
|
260
261
|
}
|