@skirbi/pinta 0.0.32 → 0.0.34
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/Changes +36 -2
- package/README.md +66 -0
- package/lib/index.mjs +1 -1
- package/lib/themes/pinta.css +95 -100
- package/package.json +1 -1
package/Changes
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
Revision history for @skirbi/pinta
|
|
2
2
|
|
|
3
|
+
0.0.34 2026-09-09 05:03:02Z
|
|
4
|
+
|
|
5
|
+
* :user-invalid fields are styled, so a field failing the browser's own
|
|
6
|
+
constraint validation reads the same as one carrying a [semtic-error]
|
|
7
|
+
message: error colour on the control border, the focus ring and the label.
|
|
8
|
+
:user-invalid rather than :invalid, so the browser holds it back until the
|
|
9
|
+
field has been left or a submit has been attempted, instead of marking a
|
|
10
|
+
half-typed value wrong on the second keystroke.
|
|
11
|
+
|
|
12
|
+
Only a real message still earns the host its wash and padding. That is what
|
|
13
|
+
label-error-position lays out and what changes the size of the field, and a
|
|
14
|
+
native invalid state has no message to place, so it stays inside the box it
|
|
15
|
+
has and nothing shifts as the user tabs out.
|
|
16
|
+
|
|
17
|
+
* Add updates that tatuahe needs
|
|
18
|
+
|
|
19
|
+
0.0.33 2026-08-26 00:11:19Z
|
|
20
|
+
|
|
21
|
+
* Checkboxes and radios are a fixed fraction of a field, and the fraction is
|
|
22
|
+
2/3.5.
|
|
23
|
+
|
|
24
|
+
* --skirbi-field-height, one token for the size of a field. It is the height
|
|
25
|
+
of a text input and a select, and the choice controls take their fraction
|
|
26
|
+
from it, so taller fields no longer mean sizing the checkboxes and radios
|
|
27
|
+
separately. Unset it resolves to the padding, border and line-height of the
|
|
28
|
+
shared control recipe. The textarea is left out: it is running text sized by
|
|
29
|
+
its rows. --skirbi-choice-size still overrides the choice controls on their
|
|
30
|
+
own, and --skirbi-choice-size-final is the resolved value the tick and the
|
|
31
|
+
dot are scaled from.
|
|
32
|
+
|
|
33
|
+
* --skirbi-control-line-height is deprecated, renamed to
|
|
34
|
+
--skirbi-field-line-height. It still works and is still read as the
|
|
35
|
+
fallback, so nothing breaks, but it will go in a later release. "control"
|
|
36
|
+
came from the [wc-control] attribute these selectors match, which is not a
|
|
37
|
+
connection a normal person would make.
|
|
38
|
+
|
|
3
39
|
0.0.32 2026-08-25 17:39:42Z
|
|
4
40
|
|
|
5
41
|
* semtic-grid[diptych] and [triptych] now stack to a single column below
|
|
@@ -23,8 +59,6 @@ Revision history for @skirbi/pinta
|
|
|
23
59
|
which only gets the marker in its own mobile dropdown. The character is
|
|
24
60
|
now the `--skirbi-nav-marker` token, shared by both.
|
|
25
61
|
|
|
26
|
-
*
|
|
27
|
-
|
|
28
62
|
0.0.31 2026-08-15 04:29:13Z
|
|
29
63
|
|
|
30
64
|
* Align checkbox/radio colors with the text-input color scheme and make
|
package/README.md
CHANGED
|
@@ -312,6 +312,72 @@ Typography is opt-in and token-driven.
|
|
|
312
312
|
```
|
|
313
313
|
|
|
314
314
|
|
|
315
|
+
# Form control tokens
|
|
316
|
+
|
|
317
|
+
One token sizes a field:
|
|
318
|
+
|
|
319
|
+
```css
|
|
320
|
+
--skirbi-field-height
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
It is the height of a text input and of a select, and the checkboxes and
|
|
324
|
+
radios take 2/3.5 of it, so they sit well inside the height of the field
|
|
325
|
+
beside them rather than reading as a big empty box. A field is tall mostly
|
|
326
|
+
through padding, which a choice control does not have, so a ratio near 1
|
|
327
|
+
would track padding the box is not carrying. Set it once and all four
|
|
328
|
+
follow.
|
|
329
|
+
|
|
330
|
+
```css
|
|
331
|
+
[skirbi-theme] {
|
|
332
|
+
--skirbi-field-height: 3.5rem;
|
|
333
|
+
}
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
Unset, it works out to the padding, border and line-height of the shared
|
|
337
|
+
control recipe, which is what these controls have always measured. The
|
|
338
|
+
textarea is left out on purpose: it is running text sized by its rows.
|
|
339
|
+
|
|
340
|
+
Two knobs remain for the exceptions:
|
|
341
|
+
|
|
342
|
+
```css
|
|
343
|
+
--skirbi-choice-size
|
|
344
|
+
--skirbi-field-line-height
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
`--skirbi-choice-size` sizes the choice controls directly, for when 2/3.5 of
|
|
348
|
+
the field is not what you want. Either way the result lands in
|
|
349
|
+
`--skirbi-choice-size-final`, which is what the tick and the radio dot are
|
|
350
|
+
scaled from, so they follow the box whichever way it was set.
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
# Invalid fields
|
|
354
|
+
|
|
355
|
+
A field reads as wrong in two cases, drawn the same way:
|
|
356
|
+
|
|
357
|
+
* `[semtic-error]` holds a message
|
|
358
|
+
* the browser's own constraint validation fails, e.g. `pattern`, `required`,
|
|
359
|
+
`type`, `min`/`max`
|
|
360
|
+
|
|
361
|
+
The second uses `:user-invalid`, not `:invalid`, so the browser holds the
|
|
362
|
+
styling back until the field has been left or a submit has been attempted. A
|
|
363
|
+
half-typed value is not marked wrong on the second keystroke, and a required
|
|
364
|
+
field is not red before it has ever been filled in.
|
|
365
|
+
|
|
366
|
+
The control border, its focus ring and the label take the error colour in both
|
|
367
|
+
cases. Only a real message also gets the host its wash and padding, because
|
|
368
|
+
that is what `label-error-position` lays out and what changes the size of the
|
|
369
|
+
field: a native invalid state stays inside the box it already has, so nothing
|
|
370
|
+
moves as the user tabs out of it.
|
|
371
|
+
|
|
372
|
+
```css
|
|
373
|
+
--skirbi-error-base
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
Note that constraint validation only runs on a native form submission. A form
|
|
377
|
+
submitted from script, e.g. a framework binding on a button, never triggers it,
|
|
378
|
+
so `:user-invalid` there only fires once a field has been left.
|
|
379
|
+
|
|
380
|
+
|
|
315
381
|
# Component recipes
|
|
316
382
|
|
|
317
383
|
Pinta ships light recipes for Semtic elements.
|
package/lib/index.mjs
CHANGED
package/lib/themes/pinta.css
CHANGED
|
@@ -564,6 +564,8 @@
|
|
|
564
564
|
var(--skirbi-quaternary-main) 30%, black);
|
|
565
565
|
--skirbi-quaternary-contrast: var(--skirbi-on-dark);
|
|
566
566
|
|
|
567
|
+
--skirbi-nav-mobile-bg: 'transparent';
|
|
568
|
+
|
|
567
569
|
/* Deprecated knobs */
|
|
568
570
|
--skirbi-primary-light: var(--skirbi-primary-soft);
|
|
569
571
|
--skirbi-primary-dark: var(--skirbi-primary-strong);
|
|
@@ -1813,6 +1815,7 @@
|
|
|
1813
1815
|
* | `--skirbi-nav-mobile-item-active-bg` | Background of an item tile while pressed. |
|
|
1814
1816
|
*/
|
|
1815
1817
|
|
|
1818
|
+
|
|
1816
1819
|
/* semtic-nav */
|
|
1817
1820
|
[skirbi-theme] {
|
|
1818
1821
|
semtic-nav > nav {
|
|
@@ -1975,34 +1978,13 @@
|
|
|
1975
1978
|
}
|
|
1976
1979
|
}
|
|
1977
1980
|
|
|
1978
|
-
/* 48rem, matching the diptych/triptych stacking breakpoint below --
|
|
1979
|
-
* this used to be 47.999rem, a fraction under, which meant a page
|
|
1980
|
-
* combining this nav with a diptych/triptych (every real page in
|
|
1981
|
-
* eekboek-www, for one) had its layout stack and its nav collapse at
|
|
1982
|
-
* two DIFFERENT widths, with a sliver of viewport width where one
|
|
1983
|
-
* had already responded and the other hadn't yet. */
|
|
1984
1981
|
@media (max-width: 48rem) {
|
|
1985
|
-
/* A 2-column/2-row grid, not flex-wrap -- flex-wrap only breaks a
|
|
1986
|
-
* line once the current line actually runs out of room, so
|
|
1987
|
-
* whether [semtic-nav-links] (however wide its own content makes
|
|
1988
|
-
* it) landed on the bar's own line or wrapped below it depended on
|
|
1989
|
-
* viewport width: wide enough for toggle+brand+links together
|
|
1990
|
-
* (roughly 511-767px, with eekboek-www's own item list) and it
|
|
1991
|
-
* sat right next to the brand instead of below it. Explicit grid
|
|
1992
|
-
* placement makes "toggle+brand on row 1, links on row 2" true at
|
|
1993
|
-
* every width in this query, never a function of how much content
|
|
1994
|
-
* happens to fit. */
|
|
1995
1982
|
semtic-nav > nav {
|
|
1996
1983
|
display: grid;
|
|
1997
1984
|
grid-template-columns: auto 1fr;
|
|
1998
1985
|
align-items: center;
|
|
1999
1986
|
}
|
|
2000
1987
|
|
|
2001
|
-
/* hamburger="right" swaps the two columns' roles rather than just
|
|
2002
|
-
* reordering within a fixed track list -- with the toggle's own
|
|
2003
|
-
* column staying `auto`-sized and the other `1fr`, either side
|
|
2004
|
-
* gets the same "hug the button, give the brand the rest" sizing
|
|
2005
|
-
* regardless of which one it is. */
|
|
2006
1988
|
semtic-nav[hamburger="right"] > nav {
|
|
2007
1989
|
grid-template-columns: 1fr auto;
|
|
2008
1990
|
}
|
|
@@ -2017,17 +1999,6 @@
|
|
|
2017
1999
|
grid-column: 2;
|
|
2018
2000
|
}
|
|
2019
2001
|
|
|
2020
|
-
/* Nothing to open -- a brand-only nav (no items authored at all)
|
|
2021
|
-
* would otherwise still show a toggle that reveals an empty panel.
|
|
2022
|
-
* Relies on semtic-nav.mjs's own connectedCallbackSugar dropping
|
|
2023
|
-
* whitespace-only text nodes rather than moving them into
|
|
2024
|
-
* [semtic-nav-links] -- otherwise a stray newline left over from
|
|
2025
|
-
* the authored HTML's own formatting (e.g. between the brand and
|
|
2026
|
-
* an `<%= include ... %>` that rendered nothing while logged out)
|
|
2027
|
-
* would keep this from ever matching `:empty`. (`:has(*)` inside
|
|
2028
|
-
* this same :has() would have sufficed too and dodged that
|
|
2029
|
-
* dependency, but :has() can't nest inside :has() -- invalid
|
|
2030
|
-
* selector, silently never matches.) */
|
|
2031
2002
|
semtic-nav:has(> nav > [semtic-nav-links]:empty) > nav > [semtic-nav-toggle] {
|
|
2032
2003
|
display: none;
|
|
2033
2004
|
}
|
|
@@ -2045,50 +2016,20 @@
|
|
|
2045
2016
|
display: none;
|
|
2046
2017
|
}
|
|
2047
2018
|
|
|
2048
|
-
/* A 3-per-row grid, not a single stacked column -- with a longer
|
|
2049
|
-
* item list (see eekboek-www's Sales/Purchases/Bank/... top nav)
|
|
2050
|
-
* one-per-line ran the open dropdown well past the fold before the
|
|
2051
|
-
* last couple of items were even reachable. The grid lands on
|
|
2052
|
-
* [semtic-nav-links] itself, so it doesn't matter whether the
|
|
2053
|
-
* items are its direct children (the bare-items case this
|
|
2054
|
-
* component's own tests use) or grouped under an authored <ul>
|
|
2055
|
-
* (a common pattern; see eekboek-www's main_nav.html.ep) -- an
|
|
2056
|
-
* authored <ul> is flattened out of the box model entirely
|
|
2057
|
-
* (`display: contents`) so its <li>s become grid items of
|
|
2058
|
-
* [semtic-nav-links] directly, same as the bare-items case. */
|
|
2059
2019
|
semtic-nav[semtic-nav-open] > nav > [semtic-nav-links] {
|
|
2060
2020
|
display: grid;
|
|
2061
2021
|
grid-column: 1 / -1;
|
|
2062
2022
|
grid-row: 2;
|
|
2063
|
-
/* Tiles size to their own label, not stretched to fill an equal
|
|
2064
|
-
* share of the row -- `justify-self: center` (not `justify-
|
|
2065
|
-
* content`, which centers tracks WITHIN a box, not the box
|
|
2066
|
-
* itself) then centers the now content-sized box within its
|
|
2067
|
-
* full-width grid area, same idea as `margin: auto` on a block
|
|
2068
|
-
* box but the grid-native way to do it for a grid ITEM. */
|
|
2069
2023
|
justify-self: center;
|
|
2070
2024
|
width: fit-content;
|
|
2071
2025
|
grid-template-columns: repeat(3, max-content);
|
|
2072
|
-
gap: 0.25rem;
|
|
2073
|
-
/* A real panel, not a see-through overlay on whatever's
|
|
2074
|
-
* scrolled underneath -- the dropdown sits on top of page
|
|
2075
|
-
* content (it's still inside <nav>, not a separate layer), so
|
|
2076
|
-
* without an opaque background the open menu's own text and
|
|
2077
|
-
* the page's own would visually run together. */
|
|
2078
2026
|
background: var(--skirbi-nav-mobile-bg, var(--skirbi-surface-bg-final));
|
|
2079
|
-
border: 1px solid var(--skirbi-nav-mobile-border, var(--skirbi-surface-border-final));
|
|
2080
|
-
border-radius: 0.5rem;
|
|
2081
|
-
padding: 0.75rem;
|
|
2082
|
-
margin-block-start: 0.75rem;
|
|
2083
2027
|
}
|
|
2084
2028
|
|
|
2085
2029
|
semtic-nav[semtic-nav-open] > nav > [semtic-nav-links] > ul {
|
|
2086
2030
|
display: contents;
|
|
2087
2031
|
}
|
|
2088
2032
|
|
|
2089
|
-
/* The inline "𐄁" separator between items reads fine in a single
|
|
2090
|
-
* row; stacked one-per-line in the open dropdown it just leaves a
|
|
2091
|
-
* stray mark floating before each label. */
|
|
2092
2033
|
semtic-nav[semtic-nav-open] semtic-nav-item + semtic-nav-item::before {
|
|
2093
2034
|
content: none;
|
|
2094
2035
|
}
|
|
@@ -2110,13 +2051,8 @@
|
|
|
2110
2051
|
));
|
|
2111
2052
|
}
|
|
2112
2053
|
|
|
2113
|
-
/* Topbar links otherwise have no marker at all (that's only ever
|
|
2114
|
-
* been a sidenav-submenu thing, see the nested-children rule
|
|
2115
|
-
* further down) -- the mobile dropdown tile needs its own "leads
|
|
2116
|
-
* somewhere" affordance since it doesn't get one from anywhere
|
|
2117
|
-
* else. */
|
|
2118
2054
|
semtic-nav[semtic-nav-open] > nav > [semtic-nav-links] [semtic-nav-link]:not([semtic-nav-heading])::before {
|
|
2119
|
-
content: var(--skirbi-nav-marker, '
|
|
2055
|
+
content: var(--skirbi-nav-marker, '');
|
|
2120
2056
|
opacity: 0.5;
|
|
2121
2057
|
font-size: 1em;
|
|
2122
2058
|
}
|
|
@@ -2142,25 +2078,16 @@
|
|
|
2142
2078
|
:is(semtic-nav-item, semtic-nav-item-group) [semtic-nav-link] {
|
|
2143
2079
|
display: flex;
|
|
2144
2080
|
|
|
2145
|
-
/* Start, not center: a label that wraps to two lines would otherwise
|
|
2146
|
-
* center the marker against the whole block, leaving it floating
|
|
2147
|
-
* between the lines instead of sitting with the first one. */
|
|
2148
2081
|
align-items: flex-start;
|
|
2149
2082
|
|
|
2150
|
-
/*
|
|
2151
|
-
* header longer than the sidenav was cut off rather than wrapped.
|
|
2152
|
-
* break-word covers the case a single token is wider than the column,
|
|
2153
|
-
* which nothing else can rescue. */
|
|
2083
|
+
/* These two mess a bit with horizontal navigation bars */
|
|
2154
2084
|
white-space: normal;
|
|
2085
|
+
width: 100%;
|
|
2086
|
+
/* end messing */
|
|
2087
|
+
|
|
2155
2088
|
overflow-wrap: break-word;
|
|
2156
2089
|
overflow: visible;
|
|
2157
2090
|
|
|
2158
|
-
/* A group header with no href renders as a <button>, so it picks up the
|
|
2159
|
-
* button recipe -- which centers its content. Combined with the
|
|
2160
|
-
* width: 100% below, that centered a group's label in the row instead
|
|
2161
|
-
* of starting it where every other label starts. The rest of that
|
|
2162
|
-
* recipe is already undone further down (text-transform, letter-spacing,
|
|
2163
|
-
* background, border, font); this is the piece that was missed. */
|
|
2164
2091
|
justify-content: flex-start;
|
|
2165
2092
|
|
|
2166
2093
|
gap: 0.375rem;
|
|
@@ -2175,7 +2102,6 @@
|
|
|
2175
2102
|
cursor: pointer;
|
|
2176
2103
|
font: inherit;
|
|
2177
2104
|
font-size: 0.9rem;
|
|
2178
|
-
width: 100%;
|
|
2179
2105
|
text-align: left;
|
|
2180
2106
|
transition:
|
|
2181
2107
|
background var(--skirbi-transition-duration, 160ms)
|
|
@@ -2330,7 +2256,7 @@
|
|
|
2330
2256
|
flex: 1;
|
|
2331
2257
|
}
|
|
2332
2258
|
|
|
2333
|
-
@media (max-width:
|
|
2259
|
+
@media (max-width: 64rem) {
|
|
2334
2260
|
position: fixed;
|
|
2335
2261
|
inset: 0;
|
|
2336
2262
|
z-index: 40;
|
|
@@ -2822,7 +2748,11 @@
|
|
|
2822
2748
|
semtic-input:has([semtic-error]:not(:empty)) [semtic-label],
|
|
2823
2749
|
semtic-input-number:has([semtic-error]:not(:empty)) [semtic-label],
|
|
2824
2750
|
semtic-select:has([semtic-error]:not(:empty)) [semtic-label],
|
|
2825
|
-
semtic-textarea:has([semtic-error]:not(:empty)) [semtic-label]
|
|
2751
|
+
semtic-textarea:has([semtic-error]:not(:empty)) [semtic-label],
|
|
2752
|
+
semtic-input:has([wc-control]:user-invalid) [semtic-label],
|
|
2753
|
+
semtic-input-number:has([wc-control]:user-invalid) [semtic-label],
|
|
2754
|
+
semtic-select:has([wc-control]:user-invalid) [semtic-label],
|
|
2755
|
+
semtic-textarea:has([wc-control]:user-invalid) [semtic-label] {
|
|
2826
2756
|
color: var(--skirbi-error-base, #b91c1c);
|
|
2827
2757
|
}
|
|
2828
2758
|
|
|
@@ -2885,7 +2815,26 @@
|
|
|
2885
2815
|
* put, and the two ended up different heights for no visible reason.
|
|
2886
2816
|
* Naming a value close to normal makes them agree, because the one that
|
|
2887
2817
|
* ignores it was going to land here anyway. */
|
|
2888
|
-
|
|
2818
|
+
/* --skirbi-control-line-height is the old name for this and still
|
|
2819
|
+
* works, deprecated: "control" came from the [wc-control] attribute the
|
|
2820
|
+
* selectors match, which is not something a theme file makes obvious. */
|
|
2821
|
+
line-height: var(
|
|
2822
|
+
--skirbi-field-line-height,
|
|
2823
|
+
var(--skirbi-control-line-height, 1.25)
|
|
2824
|
+
);
|
|
2825
|
+
|
|
2826
|
+
/* The height a field ends up with, resolved once. Read by the block-size
|
|
2827
|
+
* below and by the choice controls, which take a fraction of it: they
|
|
2828
|
+
* match this selector as well, so they inherit the same answer rather
|
|
2829
|
+
* than recomputing it. em resolves per element, and these all take
|
|
2830
|
+
* `font: inherit` above, so it is the same number either way. */
|
|
2831
|
+
--skirbi-field-height-final: var(
|
|
2832
|
+
--skirbi-field-height,
|
|
2833
|
+
calc(
|
|
2834
|
+
1em * var(--skirbi-field-line-height, var(--skirbi-control-line-height, 1.25))
|
|
2835
|
+
+ 2 * 0.6rem + 2px
|
|
2836
|
+
)
|
|
2837
|
+
);
|
|
2889
2838
|
}
|
|
2890
2839
|
|
|
2891
2840
|
/* Belt-and-suspenders on top of the shared padding/border/line-height
|
|
@@ -2899,9 +2848,16 @@
|
|
|
2899
2848
|
* removes that degree of freedom instead of chasing it per browser. */
|
|
2900
2849
|
input[wc-control],
|
|
2901
2850
|
select[wc-control] {
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2851
|
+
/* --skirbi-field-height is the one number that sizes a field. It is the
|
|
2852
|
+
* height of a text input and a select, and the choice controls derive
|
|
2853
|
+
* theirs from it further down, so a theme that wants taller fields sets
|
|
2854
|
+
* this and the checkboxes and radios follow. Unset, it works out to the
|
|
2855
|
+
* padding, border and line-height stated above, which is what these
|
|
2856
|
+
* controls have always measured.
|
|
2857
|
+
*
|
|
2858
|
+
* Not the textarea: that is running text sized by its rows, and pinning
|
|
2859
|
+
* it to a single-line height would defeat the point of one. */
|
|
2860
|
+
block-size: var(--skirbi-field-height-final);
|
|
2905
2861
|
}
|
|
2906
2862
|
|
|
2907
2863
|
/* Except the textarea, which is real running text: 1.25 is tight for
|
|
@@ -3169,10 +3125,29 @@
|
|
|
3169
3125
|
appearance: none;
|
|
3170
3126
|
-webkit-appearance: none;
|
|
3171
3127
|
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3128
|
+
/* A fraction of a field, so a checkbox sits well inside the height of
|
|
3129
|
+
* the input beside it instead of reading as a big empty box. 2/3.5 is
|
|
3130
|
+
* that fraction because a field is tall mostly through padding, which a
|
|
3131
|
+
* choice control does not have: a ratio near 1 tracks padding the box is
|
|
3132
|
+
* not carrying and overshoots as fields get airier. Against the default
|
|
3133
|
+
* field it lands a little under 24px, and against a 3.5rem one it is
|
|
3134
|
+
* 2rem.
|
|
3135
|
+
*
|
|
3136
|
+
* The ratio is taken from the same expression the field height comes
|
|
3137
|
+
* from, so setting --skirbi-field-height moves both together and the two
|
|
3138
|
+
* stay in proportion. --skirbi-choice-size overrides the result outright.
|
|
3139
|
+
*
|
|
3140
|
+
* Resolved once here and read back everywhere below, including from the
|
|
3141
|
+
* ::before that draws the tick and the dot, which inherits it. */
|
|
3142
|
+
--skirbi-choice-size-final: var(
|
|
3143
|
+
--skirbi-choice-size,
|
|
3144
|
+
calc(var(--skirbi-field-height-final) * 2 / 3.5)
|
|
3145
|
+
);
|
|
3146
|
+
|
|
3147
|
+
inline-size: var(--skirbi-choice-size-final);
|
|
3148
|
+
block-size: var(--skirbi-choice-size-final);
|
|
3149
|
+
min-inline-size: var(--skirbi-choice-size-final);
|
|
3150
|
+
min-block-size: var(--skirbi-choice-size-final);
|
|
3176
3151
|
|
|
3177
3152
|
margin: 0;
|
|
3178
3153
|
padding: 0;
|
|
@@ -3226,7 +3201,7 @@
|
|
|
3226
3201
|
) input[wc-control][type="checkbox"] {
|
|
3227
3202
|
border-radius: var(
|
|
3228
3203
|
--skirbi-choice-radius,
|
|
3229
|
-
calc(var(--skirbi-choice-size
|
|
3204
|
+
calc(var(--skirbi-choice-size-final) * 0.267)
|
|
3230
3205
|
);
|
|
3231
3206
|
}
|
|
3232
3207
|
|
|
@@ -3245,12 +3220,12 @@
|
|
|
3245
3220
|
semtic-checkbox
|
|
3246
3221
|
) input[wc-control][type="checkbox"]::before {
|
|
3247
3222
|
content: "";
|
|
3248
|
-
inline-size: calc(var(--skirbi-choice-size
|
|
3249
|
-
block-size: calc(var(--skirbi-choice-size
|
|
3223
|
+
inline-size: calc(var(--skirbi-choice-size-final) * 0.373);
|
|
3224
|
+
block-size: calc(var(--skirbi-choice-size-final) * 0.693);
|
|
3250
3225
|
|
|
3251
3226
|
border: solid currentColor;
|
|
3252
|
-
border-width: 0 calc(var(--skirbi-choice-size
|
|
3253
|
-
calc(var(--skirbi-choice-size
|
|
3227
|
+
border-width: 0 calc(var(--skirbi-choice-size-final) * 0.147)
|
|
3228
|
+
calc(var(--skirbi-choice-size-final) * 0.147) 0;
|
|
3254
3229
|
|
|
3255
3230
|
transform: rotate(45deg) scale(0);
|
|
3256
3231
|
transform-origin: center;
|
|
@@ -3272,8 +3247,8 @@
|
|
|
3272
3247
|
semtic-radio
|
|
3273
3248
|
) input[wc-control][type="radio"]::before {
|
|
3274
3249
|
content: "";
|
|
3275
|
-
inline-size: calc(var(--skirbi-choice-size
|
|
3276
|
-
block-size: calc(var(--skirbi-choice-size
|
|
3250
|
+
inline-size: calc(var(--skirbi-choice-size-final) * 0.56);
|
|
3251
|
+
block-size: calc(var(--skirbi-choice-size-final) * 0.56);
|
|
3277
3252
|
border-radius: 50%;
|
|
3278
3253
|
background: currentColor;
|
|
3279
3254
|
|
|
@@ -3352,11 +3327,31 @@
|
|
|
3352
3327
|
margin-block-start: 0.25rem;
|
|
3353
3328
|
}
|
|
3354
3329
|
|
|
3330
|
+
/* Two ways a field reads as wrong, drawn the same: a message in
|
|
3331
|
+
* [semtic-error], and the browser's own constraint validation failing on
|
|
3332
|
+
* pattern, required, type, min/max and friends.
|
|
3333
|
+
*
|
|
3334
|
+
* :user-invalid, not :invalid. The browser holds it back until the field
|
|
3335
|
+
* has been left or a submit has been attempted, so a value that is merely
|
|
3336
|
+
* half-typed is not marked wrong on the second keystroke. :invalid would
|
|
3337
|
+
* light up a required field before it has ever been filled in.
|
|
3338
|
+
*
|
|
3339
|
+
* The colours are shared, the space is not: only a real message earns the
|
|
3340
|
+
* host its wash and padding further up, because that is what
|
|
3341
|
+
* label-error-position has to lay out and what changes the size of the
|
|
3342
|
+
* field. A native invalid state has no message to place, so it stays
|
|
3343
|
+
* within the box it already has and nothing moves as the user tabs out. */
|
|
3355
3344
|
semtic-input:has([semtic-error]:not(:empty)) input[wc-control],
|
|
3356
3345
|
semtic-select:has([semtic-error]:not(:empty)) select[wc-control],
|
|
3357
3346
|
semtic-textarea:has([semtic-error]:not(:empty)) textarea[wc-control],
|
|
3358
3347
|
semtic-checkbox:has([semtic-error]:not(:empty)) input[wc-control],
|
|
3359
|
-
semtic-radio:has([semtic-error]:not(:empty)) input[wc-control]
|
|
3348
|
+
semtic-radio:has([semtic-error]:not(:empty)) input[wc-control],
|
|
3349
|
+
semtic-input input[wc-control]:user-invalid,
|
|
3350
|
+
semtic-input-number input[wc-control]:user-invalid,
|
|
3351
|
+
semtic-select select[wc-control]:user-invalid,
|
|
3352
|
+
semtic-textarea textarea[wc-control]:user-invalid,
|
|
3353
|
+
semtic-checkbox input[wc-control]:user-invalid,
|
|
3354
|
+
semtic-radio input[wc-control]:user-invalid {
|
|
3360
3355
|
border-color: var(--skirbi-error-base, #b91c1c);
|
|
3361
3356
|
box-shadow: 0 0 0 3px color-mix(
|
|
3362
3357
|
in srgb, var(--skirbi-error-base, #b91c1c) 20%, transparent
|
package/package.json
CHANGED