@leftium/nimble.css 0.11.0 → 0.12.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.
- package/dist/nimble-base.css +9 -0
- package/dist/nimble-base.min.css +1 -1
- package/dist/nimble-core.css +45 -1
- package/dist/nimble-core.min.css +1 -1
- package/dist/nimble-progress.css +0 -65
- package/dist/nimble-progress.min.css +1 -1
- package/dist/nimble.css +45 -66
- package/dist/nimble.min.css +1 -1
- package/package.json +1 -1
- package/src/_buttons.scss +20 -14
- package/src/_code.scss +2 -2
- package/src/_config.scss +4 -4
- package/src/_details.scss +9 -8
- package/src/_dialog.scss +23 -2
- package/src/_document.scss +3 -2
- package/src/_forms.scss +37 -23
- package/src/_grid-columns.scss +1 -0
- package/src/_layout-utilities.scss +14 -0
- package/src/_links.scss +1 -1
- package/src/_media.scss +2 -2
- package/src/_meter.scss +2 -2
- package/src/_print.scss +1 -1
- package/src/_progress.scss +4 -73
- package/src/_reset.scss +2 -2
- package/src/_select.scss +3 -2
- package/src/_tables.scss +3 -2
- package/src/_typography.scss +36 -20
package/src/_buttons.scss
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
// ----- Base button -----
|
|
12
12
|
|
|
13
13
|
:where(button, [type="submit"], [type="reset"], [type="button"], [role="button"]) {
|
|
14
|
-
--_btn-padding-v: 0.5em;
|
|
15
|
-
--_btn-padding-h: 1em;
|
|
14
|
+
--_btn-padding-v: 0.5em; // OP ~size-2 (em-relative)
|
|
15
|
+
--_btn-padding-h: 1em; // OP ~size-3 (em-relative)
|
|
16
16
|
|
|
17
17
|
padding: var(--_btn-padding-v) var(--_btn-padding-h);
|
|
18
18
|
background-color: var(#{$prefix}primary);
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
border: 1px solid var(#{$prefix}primary);
|
|
21
21
|
border-radius: var(#{$prefix}radius);
|
|
22
22
|
font: inherit;
|
|
23
|
-
font-size: 1rem;
|
|
23
|
+
font-size: 1rem; // OP --size-3
|
|
24
24
|
line-height: 1.5;
|
|
25
25
|
cursor: pointer;
|
|
26
26
|
text-decoration: none;
|
|
@@ -30,6 +30,12 @@
|
|
|
30
30
|
transition: background-color 0.2s, border-color 0.2s;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
// Vertical rhythm for flow-level buttons and link-as-button elements
|
|
34
|
+
// so wrapped rows don't collide.
|
|
35
|
+
:where(button, [type="submit"], [type="reset"], [type="button"], [role="button"]) {
|
|
36
|
+
margin-block-end: 0.25em; // OP ~size-1 (em-relative)
|
|
37
|
+
}
|
|
38
|
+
|
|
33
39
|
:where(button, [type="submit"], [type="reset"], [type="button"], [role="button"]):hover {
|
|
34
40
|
background-color: var(#{$prefix}primary-hover);
|
|
35
41
|
border-color: var(#{$prefix}primary-hover);
|
|
@@ -60,10 +66,10 @@
|
|
|
60
66
|
// ----- Inline (buttons within flow text) -----
|
|
61
67
|
|
|
62
68
|
:where(button, [type="submit"], [type="reset"], [type="button"], [role="button"]).inline {
|
|
63
|
-
--_btn-padding-v: 0.05em;
|
|
64
|
-
--_btn-padding-h: 0.4em;
|
|
65
|
-
margin: 0.1em 0.15em;
|
|
66
|
-
font-size: 0.875em;
|
|
69
|
+
--_btn-padding-v: 0.05em; // no OP match (micro)
|
|
70
|
+
--_btn-padding-h: 0.4em; // no OP match (near ~size-2)
|
|
71
|
+
margin: 0.1em 0.15em; // no OP match (micro)
|
|
72
|
+
font-size: 0.875em; // no OP match (7/8)
|
|
67
73
|
vertical-align: baseline;
|
|
68
74
|
}
|
|
69
75
|
|
|
@@ -81,7 +87,7 @@
|
|
|
81
87
|
|
|
82
88
|
:where([role="group"]) {
|
|
83
89
|
display: inline-flex;
|
|
84
|
-
margin-bottom:
|
|
90
|
+
margin-bottom: 0.25em; // OP ~size-1 (em-relative); match individual buttons
|
|
85
91
|
}
|
|
86
92
|
|
|
87
93
|
[role="group"] > * {
|
|
@@ -165,15 +171,15 @@
|
|
|
165
171
|
// ----- Search groups (pill shape) -----
|
|
166
172
|
|
|
167
173
|
[role="search"] [role="group"] > :first-child {
|
|
168
|
-
border-start-start-radius: 5rem;
|
|
169
|
-
border-end-start-radius: 5rem;
|
|
170
|
-
padding-inline-start: 1.25em;
|
|
174
|
+
border-start-start-radius: 5rem; // OP --size-10 (pill)
|
|
175
|
+
border-end-start-radius: 5rem; // OP --size-10 (pill)
|
|
176
|
+
padding-inline-start: 1.25em; // OP ~size-4 (em-relative)
|
|
171
177
|
}
|
|
172
178
|
|
|
173
179
|
[role="search"] [role="group"] > :last-child {
|
|
174
|
-
border-start-end-radius: 5rem;
|
|
175
|
-
border-end-end-radius: 5rem;
|
|
176
|
-
padding-inline-end: 1.25em;
|
|
180
|
+
border-start-end-radius: 5rem; // OP --size-10 (pill)
|
|
181
|
+
border-end-end-radius: 5rem; // OP --size-10 (pill)
|
|
182
|
+
padding-inline-end: 1.25em; // OP ~size-4 (em-relative)
|
|
177
183
|
}
|
|
178
184
|
|
|
179
185
|
}
|
package/src/_code.scss
CHANGED
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
|
|
10
10
|
:where(code, kbd, samp) {
|
|
11
11
|
font-family: var(#{$prefix}font-mono);
|
|
12
|
-
font-size: 0.875em;
|
|
12
|
+
font-size: 0.875em; // no OP match (7/8); OP normalize inherits font-size
|
|
13
13
|
background-color: var(#{$prefix}surface-2);
|
|
14
14
|
border-radius: var(#{$prefix}radius);
|
|
15
|
-
padding: 0.15em 0.35em;
|
|
15
|
+
padding: 0.15em 0.35em; // no OP match; OP normalize: --size-1 --size-2
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
:where(pre) {
|
package/src/_config.scss
CHANGED
|
@@ -46,13 +46,13 @@ $surface-dark-chroma-boost: 0.003 !default;
|
|
|
46
46
|
$surface-dark-hue-shift: 10 !default;
|
|
47
47
|
|
|
48
48
|
// --- Typography ---
|
|
49
|
-
$font-sans: system-ui, sans-serif !default;
|
|
50
|
-
$font-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro',
|
|
49
|
+
$font-sans: system-ui, sans-serif !default; // OP --font-sans (--font-system-ui)
|
|
50
|
+
$font-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', // OP ~--font-mono (--font-monospace-code); subset
|
|
51
51
|
Menlo, Consolas, 'DejaVu Sans Mono', monospace !default;
|
|
52
52
|
|
|
53
53
|
// --- Spacing & Layout ---
|
|
54
|
-
$spacing: 1rem !default;
|
|
55
|
-
$radius: 0.25rem !default;
|
|
54
|
+
$spacing: 1rem !default; // OP --size-3
|
|
55
|
+
$radius: 0.25rem !default; // OP --size-1
|
|
56
56
|
$content-width: 60ch !default;
|
|
57
57
|
$wide-width: 1200px !default;
|
|
58
58
|
|
package/src/_details.scss
CHANGED
|
@@ -14,23 +14,24 @@
|
|
|
14
14
|
border-radius: var(#{$prefix}radius);
|
|
15
15
|
// No vertical padding — summary provides its own via the
|
|
16
16
|
// negative-margin/padding trick for vertical centering.
|
|
17
|
-
padding: 0 1em;
|
|
17
|
+
padding: 0 1em; // OP ~size-3 (em-relative)
|
|
18
|
+
// OP normalize: padding-inline: --size-3, padding-block: --size-2
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
:where(details) {
|
|
21
|
-
margin-bottom: 0.5em;
|
|
22
|
+
margin-bottom: 0.5em; // OP ~size-2 (em-relative)
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
:where(summary) {
|
|
25
26
|
cursor: pointer;
|
|
26
|
-
font-weight: 600;
|
|
27
|
+
font-weight: 600; // OP --font-weight-6 (OP normalize uses weight-7: 700 for dt/summary)
|
|
27
28
|
// Stretch summary across the horizontal padding area, then
|
|
28
29
|
// re-apply vertical + horizontal padding on itself. When
|
|
29
30
|
// collapsed the text is vertically centered with equal padding.
|
|
30
31
|
// Vertical padding matches button padding (0.5em) so collapsed
|
|
31
32
|
// details height equals button height (2px border + 2.5em).
|
|
32
|
-
margin: 0 -1em;
|
|
33
|
-
padding: 0.5em 1em;
|
|
33
|
+
margin: 0 -1em; // OP ~size-3 (em-relative, negative)
|
|
34
|
+
padding: 0.5em 1em; // OP ~size-2 ~size-3 (em-relative)
|
|
34
35
|
// Custom markers fix iOS Safari's tiny native disclosure triangle.
|
|
35
36
|
// Full-size Unicode triangles inherit font metrics and sit on the
|
|
36
37
|
// baseline like native markers.
|
|
@@ -51,7 +52,7 @@
|
|
|
51
52
|
:where(summary[role="button"]) {
|
|
52
53
|
display: block;
|
|
53
54
|
width: auto;
|
|
54
|
-
margin: 0 -1em; //
|
|
55
|
+
margin: 0 -1em; // OP ~size-3 (em-relative, negative); restore stretch
|
|
55
56
|
list-style: none; // remove ▶/▼ marker — replaced by ::before
|
|
56
57
|
}
|
|
57
58
|
|
|
@@ -59,7 +60,7 @@
|
|
|
59
60
|
content: '▶\00a0';
|
|
60
61
|
display: inline-block;
|
|
61
62
|
transition: transform 0.2s ease;
|
|
62
|
-
font-size: 0.75em;
|
|
63
|
+
font-size: 0.75em; // no OP match (3/4)
|
|
63
64
|
vertical-align: middle;
|
|
64
65
|
}
|
|
65
66
|
|
|
@@ -69,7 +70,7 @@
|
|
|
69
70
|
|
|
70
71
|
// When open, restore vertical padding for content spacing.
|
|
71
72
|
:where(details[open]) {
|
|
72
|
-
padding-bottom: 0.5em;
|
|
73
|
+
padding-bottom: 0.5em; // OP ~size-2 (em-relative)
|
|
73
74
|
}
|
|
74
75
|
|
|
75
76
|
}
|
package/src/_dialog.scss
CHANGED
|
@@ -13,13 +13,34 @@
|
|
|
13
13
|
background-color: var(#{$prefix}surface-4);
|
|
14
14
|
border: 1px solid var(#{$prefix}border);
|
|
15
15
|
border-radius: var(#{$prefix}radius);
|
|
16
|
-
max-width: min(90vw, 40rem);
|
|
16
|
+
max-width: min(90vw, 40rem); // no OP match (above scale)
|
|
17
|
+
max-height: 85vh;
|
|
17
18
|
padding: var(#{$prefix}spacing);
|
|
18
19
|
}
|
|
19
20
|
|
|
21
|
+
// Reinforce UA centering for showModal() — some browsers lose
|
|
22
|
+
// the default position/inset/margin when author layers are present.
|
|
23
|
+
:where(dialog[open]) {
|
|
24
|
+
position: fixed;
|
|
25
|
+
inset: 0;
|
|
26
|
+
margin: auto;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// When dialog wraps an article, let the article provide all
|
|
30
|
+
// visual chrome (background, border, padding, radius).
|
|
31
|
+
:where(dialog:has(> article)) {
|
|
32
|
+
background: none;
|
|
33
|
+
border: none;
|
|
34
|
+
padding: 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:where(dialog > article) {
|
|
38
|
+
margin-bottom: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
20
41
|
dialog::backdrop {
|
|
21
42
|
background: rgb(0 0 0 / 0.5);
|
|
22
|
-
backdrop-filter: blur(4px);
|
|
43
|
+
backdrop-filter: blur(4px); // OP --size-px-1
|
|
23
44
|
animation: nc-backdrop-in 0.2s ease;
|
|
24
45
|
}
|
|
25
46
|
|
package/src/_document.scss
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
html {
|
|
12
12
|
font-family: var(#{$prefix}font-sans);
|
|
13
|
-
font-size: 100%; // = 16px in most browsers
|
|
14
|
-
line-height: 1.5;
|
|
13
|
+
font-size: 100%; // = 16px (OP --size-3) in most browsers
|
|
14
|
+
line-height: 1.5; // OP --font-lineheight-3
|
|
15
15
|
color: var(#{$prefix}text);
|
|
16
16
|
background-color: var(#{$prefix}surface-1);
|
|
17
17
|
scrollbar-gutter: stable;
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
var(#{$prefix}content-shadow-gap)
|
|
33
33
|
1fr;
|
|
34
34
|
min-height: 100dvh;
|
|
35
|
+
padding-block: var(#{$prefix}spacing);
|
|
35
36
|
position: relative;
|
|
36
37
|
}
|
|
37
38
|
|
package/src/_forms.scss
CHANGED
|
@@ -13,14 +13,15 @@
|
|
|
13
13
|
select, textarea) {
|
|
14
14
|
--_input-bg: color-mix(in oklch, var(#{$prefix}surface-1), var(#{$prefix}surface-2) 20%);
|
|
15
15
|
|
|
16
|
-
padding: 0.5em 0.75em;
|
|
16
|
+
padding: 0.5em 0.75em; // 0.5em: OP ~size-2; 0.75em: no OP match
|
|
17
|
+
// OP normalize: padding-block: --size-1, padding-inline: --size-2
|
|
17
18
|
min-height: calc(1em * 1.5 + 1em + 2px); // line-height + vertical padding + border
|
|
18
19
|
background-color: var(--_input-bg);
|
|
19
20
|
border: 1px solid var(#{$prefix}border);
|
|
20
21
|
border-radius: var(#{$prefix}radius);
|
|
21
22
|
color: var(#{$prefix}text);
|
|
22
23
|
font: inherit;
|
|
23
|
-
font-size: 1rem; // >=16px prevents iOS Safari auto-zoom on focus
|
|
24
|
+
font-size: 1rem; // OP --size-3; >=16px prevents iOS Safari auto-zoom on focus
|
|
24
25
|
transition: border-color 0.2s, box-shadow 0.2s;
|
|
25
26
|
}
|
|
26
27
|
|
|
@@ -31,6 +32,12 @@
|
|
|
31
32
|
margin-bottom: var(#{$prefix}spacing);
|
|
32
33
|
}
|
|
33
34
|
|
|
35
|
+
// When an input is the last visible child of a block that already has
|
|
36
|
+
// margin-bottom (e.g. <p>), kill the input's margin to avoid doubling.
|
|
37
|
+
:where(p, div) > :where(input, select, textarea):nth-last-child(1 of :not(datalist, script, style)) {
|
|
38
|
+
margin-bottom: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
34
41
|
// ----- Focus -----
|
|
35
42
|
|
|
36
43
|
:where(input, select, textarea):focus-visible {
|
|
@@ -45,7 +52,7 @@
|
|
|
45
52
|
display: block;
|
|
46
53
|
margin-top: calc(var(#{$prefix}spacing) * -0.75); // pull up under the input
|
|
47
54
|
margin-bottom: var(#{$prefix}spacing);
|
|
48
|
-
font-size: 0.875em;
|
|
55
|
+
font-size: 0.875em; // no OP match (7/8)
|
|
49
56
|
color: color-mix(in oklch, var(#{$prefix}text), transparent 40%);
|
|
50
57
|
}
|
|
51
58
|
|
|
@@ -72,17 +79,17 @@
|
|
|
72
79
|
|
|
73
80
|
:where(label) {
|
|
74
81
|
display: block;
|
|
75
|
-
margin-bottom: 0.25em;
|
|
82
|
+
margin-bottom: 0.25em; // OP ~size-1 (em-relative)
|
|
76
83
|
}
|
|
77
84
|
|
|
78
85
|
:where(label:has(+ input, + select, + textarea)) {
|
|
79
|
-
font-weight: 600;
|
|
86
|
+
font-weight: 600; // OP --font-weight-6
|
|
80
87
|
}
|
|
81
88
|
|
|
82
89
|
// file and range are short/inline controls — increase the label gap to match
|
|
83
90
|
// the visual weight of the spacing above and beside them.
|
|
84
91
|
:where(label:has(+ [type="file"], + [type="range"])) {
|
|
85
|
-
margin-bottom: 0.5em;
|
|
92
|
+
margin-bottom: 0.5em; // OP ~size-2 (em-relative)
|
|
86
93
|
}
|
|
87
94
|
|
|
88
95
|
// ----- Fieldset -----
|
|
@@ -95,9 +102,16 @@
|
|
|
95
102
|
max-width: 100%;
|
|
96
103
|
}
|
|
97
104
|
|
|
105
|
+
// Kill last-child bottom margin so it doesn't stack with fieldset padding.
|
|
106
|
+
// Uses :nth-last-child(of ...) to skip invisible elements (datalist, script).
|
|
107
|
+
:where(fieldset) > :nth-last-child(1 of :not(datalist, script, style)),
|
|
108
|
+
:where(fieldset) > :nth-last-child(1 of :not(datalist, script, style)) > :nth-last-child(1 of :not(datalist, script, style)) {
|
|
109
|
+
margin-bottom: 0;
|
|
110
|
+
}
|
|
111
|
+
|
|
98
112
|
:where(legend) {
|
|
99
|
-
font-weight: 600;
|
|
100
|
-
padding-inline: 0.25em;
|
|
113
|
+
font-weight: 600; // OP --font-weight-6
|
|
114
|
+
padding-inline: 0.25em; // OP ~size-1 (em-relative)
|
|
101
115
|
}
|
|
102
116
|
|
|
103
117
|
// ----- Checkbox & Radio -----
|
|
@@ -105,16 +119,16 @@
|
|
|
105
119
|
|
|
106
120
|
:where([type="checkbox"], [type="radio"]) {
|
|
107
121
|
accent-color: var(#{$prefix}primary);
|
|
108
|
-
width: 1.125em;
|
|
109
|
-
height: 1.125em;
|
|
122
|
+
width: 1.125em; // no OP match (OP normalize: --size-3 = 1rem)
|
|
123
|
+
height: 1.125em; // no OP match (OP normalize: --size-3 = 1rem)
|
|
110
124
|
margin: 0; // Remove browser default margin so flex labels align flush left
|
|
111
125
|
}
|
|
112
126
|
|
|
113
127
|
:where(label:has([type="checkbox"], [type="radio"])) {
|
|
114
128
|
display: flex;
|
|
115
129
|
align-items: center;
|
|
116
|
-
gap: 0.35em;
|
|
117
|
-
margin-bottom: 0.5em;
|
|
130
|
+
gap: 0.35em; // no OP match (near ~size-1)
|
|
131
|
+
margin-bottom: 0.5em; // OP ~size-2 (em-relative)
|
|
118
132
|
}
|
|
119
133
|
|
|
120
134
|
// Last checkbox/radio label in a group drops its bottom margin
|
|
@@ -126,8 +140,8 @@
|
|
|
126
140
|
// ----- Search (pill shape) -----
|
|
127
141
|
|
|
128
142
|
:where([type="search"]) {
|
|
129
|
-
border-radius: 5rem;
|
|
130
|
-
padding-inline: 1.25em;
|
|
143
|
+
border-radius: 5rem; // OP --size-10 (pill)
|
|
144
|
+
padding-inline: 1.25em; // OP ~size-4 (em-relative)
|
|
131
145
|
}
|
|
132
146
|
|
|
133
147
|
// ----- Range -----
|
|
@@ -157,9 +171,9 @@
|
|
|
157
171
|
}
|
|
158
172
|
|
|
159
173
|
:where([type="file"])::file-selector-button {
|
|
160
|
-
padding: 0.5em 1em;
|
|
161
|
-
margin-right: 0.75em;
|
|
162
|
-
margin-inline-end: 0.75em;
|
|
174
|
+
padding: 0.5em 1em; // OP ~size-2 ~size-3 (em-relative)
|
|
175
|
+
margin-right: 0.75em; // no OP match (between ~size-2/~size-3)
|
|
176
|
+
margin-inline-end: 0.75em; // no OP match (between ~size-2/~size-3)
|
|
163
177
|
background-color: var(#{$prefix}primary);
|
|
164
178
|
color: var(#{$prefix}primary-contrast);
|
|
165
179
|
border: 1px solid var(#{$prefix}primary);
|
|
@@ -178,7 +192,7 @@
|
|
|
178
192
|
// Natural width so picker icon stays near content (excluded from full-width rule above).
|
|
179
193
|
// appearance: none is applied outside @layer (see below) to fix iOS Safari sizing.
|
|
180
194
|
:where([type="date"], [type="month"], [type="week"], [type="time"], [type="datetime-local"]) {
|
|
181
|
-
min-width: 10em; //
|
|
195
|
+
min-width: 10em; // no OP match; prevent collapse when empty (e.g. time with no value)
|
|
182
196
|
margin-bottom: var(#{$prefix}spacing);
|
|
183
197
|
}
|
|
184
198
|
|
|
@@ -188,7 +202,7 @@
|
|
|
188
202
|
--_color-size: calc(1em * 1.5 + 1em + 2px); // Match text input height
|
|
189
203
|
margin-bottom: var(#{$prefix}spacing);
|
|
190
204
|
|
|
191
|
-
--_color-pad: 0.25em;
|
|
205
|
+
--_color-pad: 0.25em; // OP ~size-1 (em-relative)
|
|
192
206
|
|
|
193
207
|
height: var(--_color-size);
|
|
194
208
|
width: calc((var(--_color-size) - 2 * var(--_color-pad)) * 1.618 + 2 * var(--_color-pad)); // Golden ratio inner swatch
|
|
@@ -216,14 +230,14 @@
|
|
|
216
230
|
:where(label:has([type="checkbox"][role="switch"])) {
|
|
217
231
|
display: flex;
|
|
218
232
|
align-items: center;
|
|
219
|
-
gap: 0.5em;
|
|
233
|
+
gap: 0.5em; // OP ~size-2 (em-relative)
|
|
220
234
|
}
|
|
221
235
|
|
|
222
236
|
:where([type="checkbox"][role="switch"]) {
|
|
223
237
|
appearance: none;
|
|
224
|
-
width: 2.5em;
|
|
225
|
-
height: 1.25em;
|
|
226
|
-
border-radius: 1em;
|
|
238
|
+
width: 2.5em; // no OP match (custom switch width)
|
|
239
|
+
height: 1.25em; // OP ~size-4 (em-relative)
|
|
240
|
+
border-radius: 1em; // OP ~size-3 (pill, em-relative)
|
|
227
241
|
background-color: var(#{$prefix}border);
|
|
228
242
|
position: relative;
|
|
229
243
|
cursor: pointer;
|
package/src/_grid-columns.scss
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
min-width: 0; // Allow grid children to shrink below intrinsic content width
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
|
|
18
19
|
// Fix for frameworks (SvelteKit, etc.) that insert a
|
|
19
20
|
// <div style="display: contents"> wrapper between <body> and content.
|
|
20
21
|
// display: contents removes the element from the box tree for layout,
|
|
@@ -33,6 +33,20 @@
|
|
|
33
33
|
position: relative;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
// Responsive equal-column grid
|
|
37
|
+
// Mobile: single column. Above phone breakpoint: auto-fit columns.
|
|
38
|
+
// margin-bottom matches vertical rhythm of p, ul, etc.
|
|
39
|
+
.grid {
|
|
40
|
+
display: grid;
|
|
41
|
+
grid-template-columns: 1fr;
|
|
42
|
+
gap: var(#{$prefix}spacing);
|
|
43
|
+
margin-bottom: var(#{$prefix}spacing);
|
|
44
|
+
|
|
45
|
+
@media (min-width: #{$breakpoint-phone}) {
|
|
46
|
+
grid-template-columns: repeat(auto-fit, minmax(0%, 1fr));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
36
50
|
// Break out to wide max-width
|
|
37
51
|
.wide {
|
|
38
52
|
grid-column: 1 / -1;
|
package/src/_links.scss
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
:where(a:not([role="button"])) {
|
|
12
12
|
color: var(#{$prefix}primary);
|
|
13
13
|
text-decoration: underline;
|
|
14
|
-
text-underline-offset: 0.15em;
|
|
14
|
+
text-underline-offset: 0.15em; // no OP match; OP normalize: 1px (2px Firefox)
|
|
15
15
|
text-decoration-color: #{string.unquote('color-mix(in oklch, var(#{$prefix}primary), transparent 50%)')};
|
|
16
16
|
transition: color 0.2s, text-decoration-color 0.2s;
|
|
17
17
|
}
|
package/src/_media.scss
CHANGED
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
:where(figcaption) {
|
|
21
|
-
font-size: 0.9em;
|
|
21
|
+
font-size: 0.9em; // no OP match; OP normalize: --font-size-1 (1rem)
|
|
22
22
|
color: color-mix(in oklch, var(#{$prefix}text), transparent 40%);
|
|
23
|
-
margin-top: 0.5em;
|
|
23
|
+
margin-top: 0.5em; // OP ~size-2 (em-relative)
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
}
|
package/src/_meter.scss
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
-moz-appearance: none;
|
|
17
17
|
appearance: none;
|
|
18
18
|
width: 100%;
|
|
19
|
-
height: 0.5rem;
|
|
19
|
+
height: 0.5rem; // OP --size-2
|
|
20
20
|
overflow: hidden;
|
|
21
21
|
border: 0;
|
|
22
22
|
border-radius: var(#{$prefix}radius);
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
border-radius: var(#{$prefix}radius);
|
|
33
33
|
background-color: var(#{$prefix}surface-3);
|
|
34
34
|
border: 0;
|
|
35
|
-
height: 0.5rem;
|
|
35
|
+
height: 0.5rem; // OP --size-2
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
// WebKit: value bars for each semantic state
|
package/src/_print.scss
CHANGED
package/src/_progress.scss
CHANGED
|
@@ -8,81 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
@layer nimble.base {
|
|
10
10
|
|
|
11
|
+
// Native system progress bars on all platforms.
|
|
12
|
+
// Custom styling via appearance: none is broken on iOS Safari (partial
|
|
13
|
+
// stripping of native chrome) and cannot be scoped away from WebKit/Blink
|
|
14
|
+
// via CSS alone. Native bars look fine everywhere.
|
|
11
15
|
:where(progress) {
|
|
12
|
-
-webkit-appearance: none;
|
|
13
|
-
appearance: none;
|
|
14
|
-
position: relative;
|
|
15
16
|
width: 100%;
|
|
16
|
-
height: 0.5rem;
|
|
17
|
-
overflow: hidden;
|
|
18
|
-
border: 0;
|
|
19
|
-
border-radius: var(#{$prefix}radius);
|
|
20
|
-
background-color: var(#{$prefix}surface-3);
|
|
21
|
-
color: var(#{$prefix}primary); // Firefox uses color for the bar
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
:where(progress)::-webkit-progress-bar {
|
|
25
|
-
border-radius: var(#{$prefix}radius);
|
|
26
|
-
background-color: var(#{$prefix}surface-3);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
:where(progress)::-webkit-progress-value {
|
|
30
|
-
background-color: var(#{$prefix}primary);
|
|
31
|
-
border-radius: var(#{$prefix}radius);
|
|
32
|
-
transition: inline-size 0.3s ease;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
:where(progress)::-moz-progress-bar {
|
|
36
|
-
background-color: var(#{$prefix}primary);
|
|
37
|
-
border-radius: var(#{$prefix}radius);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// Indeterminate: evenly-spaced blue bands travel continuously rightward.
|
|
41
|
-
// Gradient is 200% wide with two identical 10%-wide bands at 15% and 65%.
|
|
42
|
-
// They're 50% apart — exactly one visible width (100/200 = 50% of gradient).
|
|
43
|
-
// Animating position by -200% = one full gradient width → seamless loop.
|
|
44
|
-
:where(progress):not([value]) {
|
|
45
|
-
--nc-progress-track:
|
|
46
|
-
linear-gradient(to right,
|
|
47
|
-
var(#{$prefix}surface-3) 0%,
|
|
48
|
-
var(#{$prefix}primary) 25%,
|
|
49
|
-
var(#{$prefix}primary) 25%,
|
|
50
|
-
var(#{$prefix}surface-3) 50%,
|
|
51
|
-
var(#{$prefix}surface-3) 50%,
|
|
52
|
-
var(#{$prefix}primary) 75%,
|
|
53
|
-
var(#{$prefix}primary) 75%,
|
|
54
|
-
var(#{$prefix}surface-3) 100%);
|
|
55
|
-
--nc-progress-track-size: 200% 100%;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
59
|
-
@supports selector(progress::after) {
|
|
60
|
-
:where(progress):not([value])::after {
|
|
61
|
-
content: "";
|
|
62
|
-
position: absolute;
|
|
63
|
-
inset: 0;
|
|
64
|
-
background: var(--nc-progress-track);
|
|
65
|
-
background-size: var(--nc-progress-track-size);
|
|
66
|
-
animation: nc-progress-indeterminate 12s linear infinite;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
:where(progress):not([value])::-webkit-progress-bar {
|
|
71
|
-
background: var(--nc-progress-track);
|
|
72
|
-
background-size: var(--nc-progress-track-size);
|
|
73
|
-
animation: nc-progress-indeterminate 12s linear infinite;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
:where(progress):not([value])::-moz-progress-bar {
|
|
77
|
-
background: var(--nc-progress-track);
|
|
78
|
-
background-size: var(--nc-progress-track-size);
|
|
79
|
-
animation: nc-progress-indeterminate 12s linear infinite;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
@keyframes nc-progress-indeterminate {
|
|
84
|
-
from { background-position: 0% 0%; }
|
|
85
|
-
to { background-position: -200% 0%; }
|
|
86
17
|
}
|
|
87
18
|
|
|
88
19
|
}
|
package/src/_reset.scss
CHANGED
package/src/_select.scss
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
border: 1px solid var(#{$prefix}border);
|
|
33
33
|
border-radius: var(#{$prefix}radius);
|
|
34
34
|
background-color: var(#{$prefix}surface-1);
|
|
35
|
-
padding: 0.25em;
|
|
35
|
+
padding: 0.25em; // OP ~size-1 (em-relative)
|
|
36
36
|
// Fade in/out animation
|
|
37
37
|
opacity: 0;
|
|
38
38
|
transition: opacity 0.2s, overlay 0.2s allow-discrete, display 0.2s allow-discrete;
|
|
@@ -50,7 +50,8 @@
|
|
|
50
50
|
|
|
51
51
|
// Options inside the picker
|
|
52
52
|
:where(select) option {
|
|
53
|
-
padding: 0.5em 0.75em;
|
|
53
|
+
padding: 0.5em 0.75em; // 0.5em: OP ~size-2; 0.75em: no OP match
|
|
54
|
+
// OP normalize: select uses 0.75ch block, --size-relative-4 inline
|
|
54
55
|
border-radius: var(#{$prefix}radius);
|
|
55
56
|
transition: background-color 0.15s;
|
|
56
57
|
}
|
package/src/_tables.scss
CHANGED
|
@@ -14,13 +14,14 @@
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
:where(th, td) {
|
|
17
|
-
padding: 0.5em 0.75em;
|
|
17
|
+
padding: 0.5em 0.75em; // 0.5em: OP ~size-2; 0.75em: no OP match
|
|
18
|
+
// OP normalize: --size-2 (0.5rem) both axes
|
|
18
19
|
border-bottom: 1px solid #{string.unquote('color-mix(in oklch, var(#{$prefix}border), transparent 40%)')};
|
|
19
20
|
text-align: start;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
:where(thead th, thead td) {
|
|
23
|
-
font-weight: 600;
|
|
24
|
+
font-weight: 600; // OP --font-weight-6
|
|
24
25
|
border-bottom-width: 2px;
|
|
25
26
|
background-color: var(#{$prefix}surface-2);
|
|
26
27
|
text-wrap: balance;
|