@leftium/nimble.css 0.1.0 → 0.3.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/README.md +152 -55
- package/dist/nimble-base.css +24 -141
- package/dist/nimble-base.min.css +1 -1
- package/dist/nimble-core.css +867 -0
- package/dist/nimble-core.min.css +1 -0
- package/dist/nimble-meter.css +45 -0
- package/dist/nimble-meter.min.css +1 -0
- package/dist/nimble-progress.css +71 -0
- package/dist/nimble-progress.min.css +1 -0
- package/dist/nimble-reset.css +2 -1
- package/dist/nimble-reset.min.css +1 -1
- package/dist/nimble-select.css +46 -0
- package/dist/nimble-select.min.css +1 -0
- package/dist/nimble.css +446 -38
- package/dist/nimble.min.css +1 -1
- package/package.json +10 -2
- package/src/_article.scss +65 -0
- package/src/_buttons.scss +104 -6
- package/src/_colors.scss +20 -19
- package/src/_details.scss +66 -2
- package/src/_dialog.scss +7 -1
- package/src/_document.scss +13 -2
- package/src/_forms.scss +142 -3
- package/src/_links.scss +2 -2
- package/src/_media.scss +1 -1
- package/src/_meter.scss +72 -0
- package/src/_progress.scss +88 -0
- package/src/_reset.scss +3 -1
- package/src/_select.scss +67 -0
- package/src/_typography.scss +13 -13
- package/src/nimble-base.scss +1 -2
- package/src/nimble-core.scss +31 -0
- package/src/nimble-meter.scss +8 -0
- package/src/nimble-progress.scss +8 -0
- package/src/nimble-select.scss +8 -0
- package/src/nimble.scss +7 -1
package/README.md
CHANGED
|
@@ -1,52 +1,95 @@
|
|
|
1
1
|
# nimble.css
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Minimal CSS library for great-looking default HTML styles; no classes required. ~3.4 KB brotli (core).
|
|
4
4
|
|
|
5
|
-
- **Classless
|
|
6
|
-
- **
|
|
7
|
-
- **OKLCH color system** — perceptually uniform, fully customizable via SCSS config
|
|
5
|
+
- **Classless** — every standard HTML element elegantly styled without classes
|
|
6
|
+
- **Dark mode** — included (automatic and manual)
|
|
8
7
|
- **Cascade layers** — plays nicely alongside your own styles
|
|
9
|
-
- **Tiny** —
|
|
8
|
+
- **Tiny** — core is only ~3.4 KB brotli (15.9 KB minified)
|
|
10
9
|
|
|
11
10
|
## Demos
|
|
12
11
|
|
|
13
12
|
- [HTML5 Test Page](https://leftium.github.io/nimble.css/demo/) — every standard HTML element
|
|
13
|
+
- [Pico CSS-style Demo](https://leftium.github.io/nimble.css/demo/pico.html) — Pico CSS-inspired page with forms, buttons, article, tables, and more
|
|
14
14
|
- [Extended Demo](https://leftium.github.io/nimble.css/demo/extended.html) — layouts, utilities, button variants, forms, dark mode toggle
|
|
15
15
|
|
|
16
16
|
## Quick Start
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
```html
|
|
21
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Leftium/nimble.css@main/dist/nimble.min.css">
|
|
18
|
+
```bash
|
|
19
|
+
npm install @leftium/nimble.css
|
|
22
20
|
```
|
|
23
21
|
|
|
24
|
-
|
|
22
|
+
Then import in your CSS, JS, or framework:
|
|
23
|
+
|
|
24
|
+
```css
|
|
25
|
+
/* CSS */
|
|
26
|
+
@import '@leftium/nimble.css';
|
|
27
|
+
```
|
|
25
28
|
|
|
26
|
-
|
|
29
|
+
```js
|
|
30
|
+
// JS / framework entry point
|
|
31
|
+
import '@leftium/nimble.css';
|
|
32
|
+
```
|
|
27
33
|
|
|
28
|
-
|
|
34
|
+
<details>
|
|
35
|
+
<summary>Or use CDN</summary>
|
|
29
36
|
|
|
30
|
-
|
|
31
|
-
|---|---|---|
|
|
32
|
-
| `nimble.min.css` | 11.9 KB | Everything |
|
|
33
|
-
| `nimble-base.min.css` | 5.2 KB | Reset + colors + document + typography |
|
|
34
|
-
| `nimble-reset.min.css` | 1.7 KB | Modern CSS reset only |
|
|
35
|
-
| `nimble-utilities.min.css` | 572 B | Utility classes only |
|
|
37
|
+
Via jsDelivr (npm):
|
|
36
38
|
|
|
37
39
|
```html
|
|
38
|
-
|
|
39
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Leftium/nimble.css@main/dist/nimble-base.min.css">
|
|
40
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@leftium/nimble.css/dist/nimble.min.css">
|
|
40
41
|
```
|
|
41
42
|
|
|
42
|
-
|
|
43
|
+
</details>
|
|
44
|
+
|
|
45
|
+
<details>
|
|
46
|
+
<summary>For 3.4 KB core size</summary>
|
|
47
|
+
|
|
48
|
+
`nimble.min.css` (19.4 KB) includes everything.
|
|
43
49
|
|
|
44
|
-
|
|
50
|
+
To trim size, use `nimble-core.min.css` (15.9 KB) + only the add-ons you need:
|
|
51
|
+
|
|
52
|
+
| Add-on | Minified |
|
|
53
|
+
|---|---|
|
|
54
|
+
| `nimble-progress.min.css` | 1.6 KB |
|
|
55
|
+
| `nimble-meter.min.css` | 1.0 KB |
|
|
56
|
+
| `nimble-select.min.css` | 1.0 KB |
|
|
57
|
+
|
|
58
|
+
Mix and match with CDN links (comment out what you don't need):
|
|
45
59
|
|
|
46
60
|
```html
|
|
47
|
-
<link rel="stylesheet" href="nimble.min.css">
|
|
61
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@leftium/nimble.css/dist/nimble-core.min.css">
|
|
62
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@leftium/nimble.css/dist/nimble-progress.min.css">
|
|
63
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@leftium/nimble.css/dist/nimble-meter.min.css">
|
|
64
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@leftium/nimble.css/dist/nimble-select.min.css">
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Or with SCSS (comment out what you don't need):
|
|
68
|
+
|
|
69
|
+
```scss
|
|
70
|
+
@use '@leftium/nimble.css/scss/core'; // core
|
|
71
|
+
@use '@leftium/nimble.css/scss/progress'; // add-ons
|
|
72
|
+
@use '@leftium/nimble.css/scss/meter';
|
|
73
|
+
@use '@leftium/nimble.css/scss/select';
|
|
48
74
|
```
|
|
49
75
|
|
|
76
|
+
<details>
|
|
77
|
+
<summary>Granular sub-bundles</summary>
|
|
78
|
+
|
|
79
|
+
For advanced use, `nimble-core` is composed of these non-overlapping layers:
|
|
80
|
+
|
|
81
|
+
| Sub-bundle | Minified | Contents |
|
|
82
|
+
|---|---|---|
|
|
83
|
+
| `nimble-reset.min.css` | 1.8 KB | Modern CSS reset |
|
|
84
|
+
| `nimble-base.min.css` | 3.8 KB | Colors + document + typography |
|
|
85
|
+
| `nimble-utilities.min.css` | 572 B | Utility classes |
|
|
86
|
+
|
|
87
|
+
</details>
|
|
88
|
+
|
|
89
|
+
</details>
|
|
90
|
+
|
|
91
|
+
That's it. Write semantic HTML and it just works.
|
|
92
|
+
|
|
50
93
|
## Utility Classes
|
|
51
94
|
|
|
52
95
|
Content is centered at `720px` by default — no class needed. These opt-in utilities handle the rest. Disable all with `$enable-utilities: false`.
|
|
@@ -63,52 +106,106 @@ Content is centered at `720px` by default — no class needed. These opt-in util
|
|
|
63
106
|
|
|
64
107
|
## Customization
|
|
65
108
|
|
|
66
|
-
|
|
109
|
+
### CSS Custom Properties
|
|
110
|
+
|
|
111
|
+
Override at runtime — no build step needed. Hover and focus states auto-derive from the base color via [relative color syntax](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_colors/Relative_colors).
|
|
112
|
+
|
|
113
|
+
```css
|
|
114
|
+
:root {
|
|
115
|
+
/* Surface hue (shared by backgrounds, text, border) */
|
|
116
|
+
--nc-surface-hue: 250;
|
|
117
|
+
|
|
118
|
+
/* Primary accent (links, buttons, focus rings) — hover/focus auto-derive */
|
|
119
|
+
--nc-primary: light-dark(oklch(0.5 0.2 250), oklch(0.6 0.2 250));
|
|
120
|
+
--nc-primary-contrast: light-dark(#fff, oklch(0.15 0.005 250));
|
|
121
|
+
|
|
122
|
+
/* Secondary accent (reset buttons) — hover/focus auto-derive */
|
|
123
|
+
--nc-secondary: light-dark(oklch(0.45 0.05 250), oklch(0.6 0.05 250));
|
|
124
|
+
--nc-secondary-contrast: light-dark(#fff, oklch(0.15 0.005 250));
|
|
125
|
+
|
|
126
|
+
/* Validation colors */
|
|
127
|
+
--nc-valid: light-dark(oklch(0.52 0.17 145), oklch(0.65 0.2 145));
|
|
128
|
+
--nc-invalid: light-dark(oklch(0.55 0.22 25), oklch(0.65 0.22 25));
|
|
129
|
+
|
|
130
|
+
/* Font stacks */
|
|
131
|
+
--nc-font-sans: system-ui, sans-serif;
|
|
132
|
+
--nc-font-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
|
|
133
|
+
|
|
134
|
+
/* Layout */
|
|
135
|
+
--nc-spacing: 1rem;
|
|
136
|
+
--nc-radius: 0.25rem;
|
|
137
|
+
--nc-content-width: 720px;
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
These properties are auto-derived and available for use in your own components (no need to set them):
|
|
142
|
+
|
|
143
|
+
`--nc-surface-1` .. `--nc-surface-4`, `--nc-text`, `--nc-border`, `--nc-primary-hover`, `--nc-primary-focus`, `--nc-secondary-hover`, `--nc-secondary-focus`
|
|
144
|
+
|
|
145
|
+
<details>
|
|
146
|
+
<summary>SCSS (advanced)</summary>
|
|
147
|
+
|
|
148
|
+
Build a CSS file with new defaults. SCSS-unique options listed first; the rest mirror CSS custom properties above.
|
|
67
149
|
|
|
68
150
|
```scss
|
|
69
151
|
@use 'nimble' with (
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
$
|
|
73
|
-
$
|
|
74
|
-
|
|
152
|
+
// --- SCSS-only (no CSS custom property equivalent) ---
|
|
153
|
+
|
|
154
|
+
$prefix: '--nc-', // CSS custom property prefix
|
|
155
|
+
$wide-width: 1200px, // wide layout max-width (used in utilities)
|
|
156
|
+
|
|
157
|
+
// Feature flags (tree-shake unused components)
|
|
158
|
+
$enable-utilities: true,
|
|
159
|
+
$enable-dialog: true,
|
|
160
|
+
$enable-switch: true,
|
|
161
|
+
$enable-details: true,
|
|
162
|
+
|
|
163
|
+
// Surface fine-tuning
|
|
164
|
+
$surface-chroma: 0.002,
|
|
165
|
+
$surface-light-base: 0.985, // light mode base lightness
|
|
166
|
+
$surface-dark-base: 0.170, // dark mode base lightness
|
|
167
|
+
$surface-offsets: (2: 0.03, 3: 0.06, 4: 0.10),
|
|
168
|
+
$surface-dark-chroma-boost: 0.003,
|
|
169
|
+
$surface-dark-hue-shift: 10,
|
|
170
|
+
|
|
171
|
+
// --- Same as CSS custom properties above ---
|
|
172
|
+
|
|
173
|
+
$surface-hue: 250,
|
|
174
|
+
|
|
175
|
+
// Primary accent (hue, chroma, lightness → --nc-primary)
|
|
176
|
+
$primary-hue: 250,
|
|
177
|
+
$primary-chroma: 0.2,
|
|
178
|
+
$primary-lightness: 0.50,
|
|
179
|
+
|
|
180
|
+
// Secondary accent (hue, chroma, lightness → --nc-secondary)
|
|
181
|
+
$secondary-hue: 250,
|
|
182
|
+
$secondary-chroma: 0.05,
|
|
183
|
+
$secondary-lightness: 0.45,
|
|
184
|
+
|
|
185
|
+
// Font stacks
|
|
186
|
+
$font-sans: (system-ui, sans-serif),
|
|
187
|
+
$font-mono: (ui-monospace, monospace),
|
|
188
|
+
|
|
189
|
+
// Layout
|
|
190
|
+
$spacing: 1rem,
|
|
191
|
+
$radius: 0.25rem,
|
|
192
|
+
$content-width: 720px,
|
|
75
193
|
);
|
|
76
194
|
```
|
|
77
195
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
| Variable | Default | Description |
|
|
81
|
-
|---|---|---|
|
|
82
|
-
| `$prefix` | `'--nc-'` | CSS custom property prefix |
|
|
83
|
-
| `$primary-hue` | `250` | Primary accent hue (OKLCH) |
|
|
84
|
-
| `$primary-chroma` | `0.2` | Primary accent chroma |
|
|
85
|
-
| `$primary-lightness` | `0.50` | Primary accent lightness |
|
|
86
|
-
| `$secondary-hue` | `250` | Secondary accent hue |
|
|
87
|
-
| `$secondary-chroma` | `0.05` | Secondary accent chroma |
|
|
88
|
-
| `$secondary-lightness` | `0.45` | Secondary accent lightness |
|
|
89
|
-
| `$surface-hue` | `250` | Background surface hue |
|
|
90
|
-
| `$font-sans` | `system-ui, sans-serif` | Body font stack |
|
|
91
|
-
| `$font-mono` | `ui-monospace, ...` | Code font stack |
|
|
92
|
-
| `$spacing` | `1rem` | Base spacing unit |
|
|
93
|
-
| `$radius` | `0.25rem` | Border radius |
|
|
94
|
-
| `$content-width` | `720px` | Max content width |
|
|
95
|
-
| `$wide-width` | `1200px` | Wide layout max-width |
|
|
96
|
-
| `$enable-utilities` | `true` | Include utility classes |
|
|
97
|
-
| `$enable-dialog` | `true` | Include dialog styles |
|
|
98
|
-
| `$enable-switch` | `true` | Include switch toggle |
|
|
99
|
-
| `$enable-details` | `true` | Include details/summary |
|
|
196
|
+
</details>
|
|
100
197
|
|
|
101
198
|
## Design Lineage
|
|
102
199
|
|
|
103
200
|
nimble.css combines [Open Props](https://open-props.style/)'s design token philosophy with [PicoCSS](https://picocss.com/)'s classless aesthetics. Key concepts borrowed from Open Props:
|
|
104
201
|
|
|
105
|
-
- **Surface hierarchy** (`surface-1` through `surface-4`) — layered backgrounds for page, card, input, and overlay contexts
|
|
106
|
-
- **Text
|
|
107
|
-
- **OKLCH color space** — perceptually uniform color system. Change
|
|
202
|
+
- **Surface hierarchy** (`surface-1` through `surface-4`) — layered backgrounds for page, card, input, and overlay contexts, all derived from a single `--nc-surface-hue`.
|
|
203
|
+
- **Text color** (`text`) — single text color variable; muted text derived inline via `color-mix()`.
|
|
204
|
+
- **OKLCH color space** — perceptually uniform color system. Change `--nc-primary` and hover/focus states regenerate automatically via [relative color syntax](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_colors/Relative_colors).
|
|
108
205
|
- **Curated scale values** — `$spacing: 1rem` (~Open Props `size-3`) and `$radius: 0.25rem` (~Open Props `radius-2`) are sourced from Open Props' scales.
|
|
109
206
|
- **Minimal DevTools pollution** — ~20 semantic custom properties on `:root` plus scoped `--_` internals per component, rather than dumping hundreds of variables globally.
|
|
110
207
|
|
|
111
|
-
The key architectural difference: nimble.css is self-contained SCSS with no runtime dependency on Open Props.
|
|
208
|
+
The key architectural difference: nimble.css is self-contained SCSS with no runtime dependency on Open Props. Color derivatives (hover, focus, surfaces) are expressed as native CSS relative colors and `calc()`, so runtime theming works without a build step.
|
|
112
209
|
|
|
113
210
|
## Building from Source
|
|
114
211
|
|
package/dist/nimble-base.css
CHANGED
|
@@ -1,140 +1,21 @@
|
|
|
1
1
|
@layer nimble.reset, nimble.base;
|
|
2
|
-
@layer nimble.reset {
|
|
3
|
-
:where(*),
|
|
4
|
-
:where(*::before),
|
|
5
|
-
:where(*::after) {
|
|
6
|
-
box-sizing: border-box;
|
|
7
|
-
background-repeat: no-repeat;
|
|
8
|
-
}
|
|
9
|
-
:where(html) {
|
|
10
|
-
line-height: 1.5;
|
|
11
|
-
-webkit-text-size-adjust: 100%;
|
|
12
|
-
tab-size: 4;
|
|
13
|
-
}
|
|
14
|
-
:where(body) {
|
|
15
|
-
margin: 0;
|
|
16
|
-
}
|
|
17
|
-
:where(h1) {
|
|
18
|
-
font-size: 2em;
|
|
19
|
-
margin-block: 0.67em;
|
|
20
|
-
}
|
|
21
|
-
:where(hr) {
|
|
22
|
-
height: 0;
|
|
23
|
-
color: inherit;
|
|
24
|
-
}
|
|
25
|
-
:where(nav) :where(ol, ul) {
|
|
26
|
-
list-style-type: none;
|
|
27
|
-
padding: 0;
|
|
28
|
-
}
|
|
29
|
-
:where(pre) {
|
|
30
|
-
font-family: monospace, monospace;
|
|
31
|
-
font-size: 1em;
|
|
32
|
-
}
|
|
33
|
-
:where(abbr[title]) {
|
|
34
|
-
text-decoration: underline dotted;
|
|
35
|
-
}
|
|
36
|
-
:where(b, strong) {
|
|
37
|
-
font-weight: bolder;
|
|
38
|
-
}
|
|
39
|
-
:where(code, kbd, samp) {
|
|
40
|
-
font-family: monospace, monospace;
|
|
41
|
-
font-size: 1em;
|
|
42
|
-
}
|
|
43
|
-
:where(small) {
|
|
44
|
-
font-size: 80%;
|
|
45
|
-
}
|
|
46
|
-
:where(sub, sup) {
|
|
47
|
-
font-size: 75%;
|
|
48
|
-
line-height: 0;
|
|
49
|
-
position: relative;
|
|
50
|
-
vertical-align: baseline;
|
|
51
|
-
}
|
|
52
|
-
:where(sub) {
|
|
53
|
-
bottom: -0.25em;
|
|
54
|
-
}
|
|
55
|
-
:where(sup) {
|
|
56
|
-
top: -0.5em;
|
|
57
|
-
}
|
|
58
|
-
:where(iframe) {
|
|
59
|
-
border-style: none;
|
|
60
|
-
}
|
|
61
|
-
:where(table) {
|
|
62
|
-
border-collapse: collapse;
|
|
63
|
-
border-color: currentColor;
|
|
64
|
-
text-indent: 0;
|
|
65
|
-
}
|
|
66
|
-
:where(button, input, select, textarea) {
|
|
67
|
-
font: inherit;
|
|
68
|
-
letter-spacing: inherit;
|
|
69
|
-
}
|
|
70
|
-
:where(button, [type=button], [type=reset], [type=submit]) {
|
|
71
|
-
-webkit-appearance: button;
|
|
72
|
-
}
|
|
73
|
-
:where(fieldset) {
|
|
74
|
-
border: 1px solid #a0a0a0;
|
|
75
|
-
}
|
|
76
|
-
:where(progress) {
|
|
77
|
-
vertical-align: baseline;
|
|
78
|
-
}
|
|
79
|
-
:where(textarea) {
|
|
80
|
-
resize: vertical;
|
|
81
|
-
overflow: auto;
|
|
82
|
-
}
|
|
83
|
-
:where([type=search]) {
|
|
84
|
-
-webkit-appearance: textfield;
|
|
85
|
-
outline-offset: -2px;
|
|
86
|
-
}
|
|
87
|
-
:where(::-webkit-search-decoration) {
|
|
88
|
-
-webkit-appearance: none;
|
|
89
|
-
}
|
|
90
|
-
:where(::-webkit-inner-spin-button),
|
|
91
|
-
:where(::-webkit-outer-spin-button) {
|
|
92
|
-
height: auto;
|
|
93
|
-
}
|
|
94
|
-
:where(::-webkit-file-upload-button) {
|
|
95
|
-
-webkit-appearance: button;
|
|
96
|
-
font: inherit;
|
|
97
|
-
}
|
|
98
|
-
:where(summary) {
|
|
99
|
-
display: list-item;
|
|
100
|
-
}
|
|
101
|
-
:where(a, area, button, input, label, select, summary, textarea, [tabindex]) {
|
|
102
|
-
touch-action: manipulation;
|
|
103
|
-
}
|
|
104
|
-
:where([aria-busy=true]) {
|
|
105
|
-
cursor: progress;
|
|
106
|
-
}
|
|
107
|
-
:where([aria-disabled=true], [disabled]) {
|
|
108
|
-
cursor: not-allowed;
|
|
109
|
-
}
|
|
110
|
-
@media (prefers-reduced-motion: reduce) {
|
|
111
|
-
:where(*),
|
|
112
|
-
:where(*::before),
|
|
113
|
-
:where(*::after) {
|
|
114
|
-
animation-duration: 0.01ms !important;
|
|
115
|
-
animation-iteration-count: 1 !important;
|
|
116
|
-
transition-duration: 0.01ms !important;
|
|
117
|
-
scroll-behavior: auto !important;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
2
|
@layer nimble.base {
|
|
122
3
|
:root {
|
|
123
4
|
color-scheme: light dark;
|
|
124
|
-
--nc-surface-
|
|
125
|
-
--nc-surface-
|
|
126
|
-
--nc-surface-
|
|
127
|
-
--nc-surface-
|
|
128
|
-
--nc-
|
|
129
|
-
--nc-text
|
|
130
|
-
--nc-border: light-dark(oklch(0.83 0.005
|
|
5
|
+
--nc-surface-hue: 250;
|
|
6
|
+
--nc-surface-1: light-dark(oklch(0.985 0.002 var(--nc-surface-hue)), oklch(0.17 0.005 calc(var(--nc-surface-hue) + 10)));
|
|
7
|
+
--nc-surface-2: light-dark(oklch(0.955 0.002 var(--nc-surface-hue)), oklch(0.2 0.005 calc(var(--nc-surface-hue) + 10)));
|
|
8
|
+
--nc-surface-3: light-dark(oklch(0.925 0.002 var(--nc-surface-hue)), oklch(0.23 0.005 calc(var(--nc-surface-hue) + 10)));
|
|
9
|
+
--nc-surface-4: light-dark(oklch(0.885 0.002 var(--nc-surface-hue)), oklch(0.27 0.005 calc(var(--nc-surface-hue) + 10)));
|
|
10
|
+
--nc-text: light-dark(oklch(0.28 0.005 var(--nc-surface-hue)), oklch(0.86 0.005 var(--nc-surface-hue)));
|
|
11
|
+
--nc-border: light-dark(oklch(0.83 0.005 var(--nc-surface-hue)), oklch(0.28 0.005 calc(var(--nc-surface-hue) + 10)));
|
|
131
12
|
--nc-primary: light-dark(oklch(0.5 0.2 250), oklch(0.6 0.2 250));
|
|
132
|
-
--nc-primary-hover: light-dark(oklch(
|
|
133
|
-
--nc-primary-focus: oklch(
|
|
13
|
+
--nc-primary-hover: light-dark(oklch(from var(--nc-primary) calc(l - 0.1) c h), oklch(from var(--nc-primary) calc(l + 0.1) c h));
|
|
14
|
+
--nc-primary-focus: oklch(from var(--nc-primary) l c h / 0.4);
|
|
134
15
|
--nc-primary-contrast: light-dark(#fff, oklch(0.15 0.005 250));
|
|
135
16
|
--nc-secondary: light-dark(oklch(0.45 0.05 250), oklch(0.6 0.05 250));
|
|
136
|
-
--nc-secondary-hover: light-dark(oklch(
|
|
137
|
-
--nc-secondary-focus: oklch(
|
|
17
|
+
--nc-secondary-hover: light-dark(oklch(from var(--nc-secondary) calc(l - 0.1) c h), oklch(from var(--nc-secondary) calc(l + 0.1) c h));
|
|
18
|
+
--nc-secondary-focus: oklch(from var(--nc-secondary) l c h / 0.3);
|
|
138
19
|
--nc-secondary-contrast: light-dark(#fff, oklch(0.15 0.005 250));
|
|
139
20
|
--nc-valid: light-dark(oklch(0.52 0.17 145), oklch(0.65 0.2 145));
|
|
140
21
|
--nc-invalid: light-dark(oklch(0.55 0.22 25), oklch(0.65 0.22 25));
|
|
@@ -156,7 +37,7 @@
|
|
|
156
37
|
font-family: var(--nc-font-sans);
|
|
157
38
|
font-size: 100%;
|
|
158
39
|
line-height: 1.5;
|
|
159
|
-
color: var(--nc-text
|
|
40
|
+
color: var(--nc-text);
|
|
160
41
|
background-color: var(--nc-surface-1);
|
|
161
42
|
}
|
|
162
43
|
body {
|
|
@@ -166,10 +47,15 @@
|
|
|
166
47
|
}
|
|
167
48
|
body > * {
|
|
168
49
|
grid-column: 2;
|
|
50
|
+
min-width: 0;
|
|
51
|
+
}
|
|
52
|
+
body > [style*="display: contents"] > * {
|
|
53
|
+
grid-column: 2;
|
|
54
|
+
min-width: 0;
|
|
169
55
|
}
|
|
170
56
|
::selection {
|
|
171
57
|
background-color: var(--nc-primary-focus);
|
|
172
|
-
color: var(--nc-text
|
|
58
|
+
color: var(--nc-text);
|
|
173
59
|
}
|
|
174
60
|
}
|
|
175
61
|
@layer nimble.base {
|
|
@@ -184,7 +70,7 @@
|
|
|
184
70
|
h2 {
|
|
185
71
|
font-size: 1.75rem;
|
|
186
72
|
line-height: 1.15;
|
|
187
|
-
margin-top:
|
|
73
|
+
margin-top: 2rem;
|
|
188
74
|
margin-bottom: var(--nc-spacing);
|
|
189
75
|
font-weight: 700;
|
|
190
76
|
text-wrap: balance;
|
|
@@ -192,7 +78,7 @@
|
|
|
192
78
|
h3 {
|
|
193
79
|
font-size: 1.5rem;
|
|
194
80
|
line-height: 1.2;
|
|
195
|
-
margin-top:
|
|
81
|
+
margin-top: 1.5rem;
|
|
196
82
|
margin-bottom: var(--nc-spacing);
|
|
197
83
|
font-weight: 700;
|
|
198
84
|
text-wrap: balance;
|
|
@@ -200,7 +86,7 @@
|
|
|
200
86
|
h4 {
|
|
201
87
|
font-size: 1.25rem;
|
|
202
88
|
line-height: 1.3;
|
|
203
|
-
margin-top:
|
|
89
|
+
margin-top: 1.5rem;
|
|
204
90
|
margin-bottom: var(--nc-spacing);
|
|
205
91
|
font-weight: 700;
|
|
206
92
|
text-wrap: balance;
|
|
@@ -208,7 +94,7 @@
|
|
|
208
94
|
h5 {
|
|
209
95
|
font-size: 1.125rem;
|
|
210
96
|
line-height: 1.4;
|
|
211
|
-
margin-top:
|
|
97
|
+
margin-top: 1.5rem;
|
|
212
98
|
margin-bottom: var(--nc-spacing);
|
|
213
99
|
font-weight: 700;
|
|
214
100
|
text-wrap: balance;
|
|
@@ -216,7 +102,7 @@
|
|
|
216
102
|
h6 {
|
|
217
103
|
font-size: 1rem;
|
|
218
104
|
line-height: 1.5;
|
|
219
|
-
margin-top:
|
|
105
|
+
margin-top: 1.5rem;
|
|
220
106
|
margin-bottom: var(--nc-spacing);
|
|
221
107
|
font-weight: 700;
|
|
222
108
|
text-wrap: balance;
|
|
@@ -236,9 +122,6 @@
|
|
|
236
122
|
margin-top: 0;
|
|
237
123
|
margin-bottom: var(--nc-spacing);
|
|
238
124
|
}
|
|
239
|
-
:where(p, ul, ol, dl, blockquote, pre, table, figure, form) + :is(h1, h2, h3, h4, h5, h6) {
|
|
240
|
-
margin-top: calc(var(--nc-spacing) * 2);
|
|
241
|
-
}
|
|
242
125
|
ul, ol {
|
|
243
126
|
padding-inline-start: 1.5em;
|
|
244
127
|
}
|
|
@@ -266,7 +149,7 @@
|
|
|
266
149
|
:where(blockquote) cite {
|
|
267
150
|
font-style: normal;
|
|
268
151
|
font-size: 0.9em;
|
|
269
|
-
color: var(--nc-text
|
|
152
|
+
color: color-mix(in oklch, var(--nc-text), transparent 40%);
|
|
270
153
|
}
|
|
271
154
|
hr {
|
|
272
155
|
border: none;
|
package/dist/nimble-base.min.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer nimble.reset
|
|
1
|
+
@layer nimble.reset;@layer nimble.base{:root{color-scheme:light dark;--nc-surface-hue:250;--nc-surface-1:light-dark(oklch(.985 .002 var(--nc-surface-hue)),oklch(.17 .005 calc(var(--nc-surface-hue) + 10)));--nc-surface-2:light-dark(oklch(.955 .002 var(--nc-surface-hue)),oklch(.2 .005 calc(var(--nc-surface-hue) + 10)));--nc-surface-3:light-dark(oklch(.925 .002 var(--nc-surface-hue)),oklch(.23 .005 calc(var(--nc-surface-hue) + 10)));--nc-surface-4:light-dark(oklch(.885 .002 var(--nc-surface-hue)),oklch(.27 .005 calc(var(--nc-surface-hue) + 10)));--nc-text:light-dark(oklch(.28 .005 var(--nc-surface-hue)),oklch(.86 .005 var(--nc-surface-hue)));--nc-border:light-dark(oklch(.83 .005 var(--nc-surface-hue)),oklch(.28 .005 calc(var(--nc-surface-hue) + 10)));--nc-primary:light-dark(oklch(50% .2 250),oklch(60% .2 250));--nc-primary-hover:light-dark(oklch(from var(--nc-primary) calc(l - .1) c h),oklch(from var(--nc-primary) calc(l + .1) c h));--nc-primary-focus:oklch(from var(--nc-primary) l c h / .4);--nc-primary-contrast:light-dark(#fff,oklch(15% .005 250));--nc-secondary:light-dark(oklch(45% .05 250),oklch(60% .05 250));--nc-secondary-hover:light-dark(oklch(from var(--nc-secondary) calc(l - .1) c h),oklch(from var(--nc-secondary) calc(l + .1) c h));--nc-secondary-focus:oklch(from var(--nc-secondary) l c h / .3);--nc-secondary-contrast:light-dark(#fff,oklch(15% .005 250));--nc-valid:light-dark(oklch(52% .17 145),oklch(65% .2 145));--nc-invalid:light-dark(oklch(55% .22 25),oklch(65% .22 25));--nc-font-sans:system-ui, sans-serif;--nc-font-mono:ui-monospace, Cascadia Code, Source Code Pro, Menlo, Consolas, DejaVu Sans Mono, monospace;--nc-spacing:1rem;--nc-radius:.25rem;--nc-content-width:720px}[data-theme=dark]{color-scheme:dark}[data-theme=light]{color-scheme:light}html{font-family:var(--nc-font-sans);color:var(--nc-text);background-color:var(--nc-surface-1);font-size:100%;line-height:1.5}body{grid-template-columns:1fr min(var(--nc-content-width), calc(100% - 2 * var(--nc-spacing))) 1fr;min-height:100dvh;display:grid}body>*,body>[style*="display: contents"]>*{grid-column:2;min-width:0}::selection{background-color:var(--nc-primary-focus);color:var(--nc-text)}h1{margin-top:0;margin-bottom:var(--nc-spacing);text-wrap:balance;font-size:2rem;font-weight:700;line-height:1.1}h2{margin-top:2rem;margin-bottom:var(--nc-spacing);text-wrap:balance;font-size:1.75rem;font-weight:700;line-height:1.15}h3{margin-top:1.5rem;margin-bottom:var(--nc-spacing);text-wrap:balance;font-size:1.5rem;font-weight:700;line-height:1.2}h4{margin-top:1.5rem;margin-bottom:var(--nc-spacing);text-wrap:balance;font-size:1.25rem;font-weight:700;line-height:1.3}h5{margin-top:1.5rem;margin-bottom:var(--nc-spacing);text-wrap:balance;font-size:1.125rem;font-weight:700;line-height:1.4}h6{margin-top:1.5rem;margin-bottom:var(--nc-spacing);text-wrap:balance;font-size:1rem;font-weight:700;line-height:1.5}@media (width<=720px){h1{font-size:1.75rem}h2{font-size:1.5rem}h3{font-size:1.3rem}}p,ul,ol,dl,blockquote,pre,table,figure,form,fieldset{margin-top:0;margin-bottom:var(--nc-spacing)}ul,ol{padding-inline-start:1.5em}li{margin-bottom:.25em}:where(li)>:where(ul,ol){margin-bottom:0}dt{font-weight:600}dd{margin-inline-start:1.5em;margin-bottom:.5em}blockquote{margin-block:var(--nc-spacing);padding:.25em var(--nc-spacing);border-inline-start:.25rem solid var(--nc-border);margin-inline:0;font-style:italic}:where(blockquote) footer,:where(blockquote) cite{color:color-mix(in oklch, var(--nc-text), transparent 40%);font-size:.9em;font-style:normal}hr{background-color:color-mix(in oklch, var(--nc-border), transparent 40%);height:1px;margin:calc(var(--nc-spacing) * 2) 0;border:none}mark{color:light-dark(inherit,oklch(95% .01 85));background-color:light-dark(#fde68a,oklch(55% .12 85));border-radius:2px;padding:.1em .25em}address{font-style:normal}}
|