You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-8Lines changed: 9 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,14 +92,15 @@ That's it. Write semantic HTML and it just works.
92
92
93
93
## Utility Classes
94
94
95
-
Content is centered at `720px` by default — no class needed. These opt-in utilities handle the rest. Disable all with `$enable-utilities: false`.
95
+
Content is centered at `60ch` by default — no class needed. These opt-in utilities handle the rest. Disable all with `$enable-utilities: false`.
96
96
97
97
| Class | Description |
98
98
|---|---|
99
99
|`.fluid`| Full viewport width with padding (opt out of centering) |
100
100
|`.container`| Re-center content inside a `.fluid` layout |
101
-
|`.full-bleed`| Break out of centered layout to full width |
102
-
|`.wide`| Break out to wide max-width (1200px) |
101
+
|`.bleed-full`| Break out of centered layout to full viewport width |
102
+
|`.bleed-wide`| Break out to wide max-width (1200px) |
103
+
|`.bleed-edge`| Break out to shadow/paper edge (tracks shadow visibility) |
103
104
|`.striped`| Striped table rows (apply to table wrapper) |
104
105
|`.visually-hidden`| Hidden visually, accessible to screen readers |
105
106
|`.overflow-auto`| Scrollable container |
@@ -109,19 +110,19 @@ Content is centered at `720px` by default — no class needed. These opt-in util
109
110
nimble.css styles can conflict with third-party components (datatables, rich text editors, etc.) that expect unstyled elements. Add `.no-nimble` to opt out of nimble's component styles inside a subtree:
**What still applies:** Reset, colors/custom properties, body grid, layout utilities (`.fluid`, `.full-bleed`, `.wide`, `.container`), and print styles. This means layout classes work on `.no-nimble` elements.
125
+
**What still applies:** Reset, colors/custom properties, body grid, layout utilities (`.fluid`, `.bleed-full`, `.bleed-wide`, `.bleed-edge`, `.container`), and print styles. This means layout classes work on `.no-nimble` elements.
125
126
126
127
This works via CSS `@scope` (Chrome 118+, Safari 17.4+, Firefox 128+). To disable scoping entirely (smaller output, no opt-out):
127
128
@@ -161,7 +162,7 @@ Override at runtime — no build step needed. Hover and focus states auto-derive
161
162
/* Layout */
162
163
--nc-spacing: 1rem;
163
164
--nc-radius: 0.25rem;
164
-
--nc-content-width: 720px;
165
+
--nc-content-width: 60ch;
165
166
}
166
167
```
167
168
@@ -219,7 +220,7 @@ Build a CSS file with new defaults. SCSS-unique options listed first; the rest m
**Migration note:** If your Pico project wraps everything in `<main class="container">`, you can keep it (nimble's `.container` applies `max-width` + `margin-inline: auto`), but you may not need it. The body grid already centers direct children at `--nc-content-width` (720px).
264
+
**Migration note:** If your Pico project wraps everything in `<main class="container">`, you can keep it (nimble's `.container` applies `max-width` + `margin-inline: auto`), but you may not need it. The body grid already centers direct children at `--nc-content-width` (`60ch`).
Copy file name to clipboardExpand all lines: specs/vanilla-migration.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -129,7 +129,7 @@ Projects with form elements (rift-transcription, veneer, weather-sense) have han
129
129
- Create or update `src/app.css` with nimble import
130
130
- Update `+layout.svelte` to import app.css
131
131
- Remove duplicated `max-width`/`margin`/`padding`/`font-family` from 3 pages
132
-
- Set `--nc-content-width: 640px` (narrower than nimble's 720px default)
132
+
- Set `--nc-content-width: 640px` (narrower than nimble's `60ch` default)
133
133
- Possibly add `.no-nimble` on TranscriptArea container
134
134
- Remove or reduce custom form styles that nimble now provides
135
135
@@ -241,7 +241,7 @@ Projects with form elements (rift-transcription, veneer, weather-sense) have han
241
241
-**Custom elements everywhere** — `<d-item>`, `<d-title>`, `<d-metadata>`, `<s-points>`, `<s-comments>`, `<s-time>`, `<s-url>`, `<s-scroll>`, `<s-index>`, `<wrap-page>`, `<s-config>`, `<s-top-icon>`. nimble won't style any of these — no conflicts.
242
242
-**`wrap-page` element** — Has `box-shadow` and border styling at the `42.875em` breakpoint. nimble's body grid replaces the centering but `wrap-page` styling is project-specific.
243
243
-**Open Props tokens** — Used throughout (`--size-1` through `--size-6`, `--font-size-0` through `--font-size-2`, `--font-weight-2/4/6`, `--shadow-6`). These are independent of nimble and should remain.
244
-
-**Content width** — Currently `42.875em` (686px). nimble defaults to `60ch` (~720px). Either keep `42.875em` via `--nc-content-width` or adjust.
244
+
-**Content width** — Currently `42.875em` (686px). nimble defaults to `60ch`. Either keep `42.875em` via `--nc-content-width` or adjust.
245
245
-**CSS `light-dark()` function** — Project uses this modern CSS feature for dark mode. nimble also uses `light-dark()`. Good alignment.
246
246
-**Config page form controls** — Radio button groups use CSS `columns: 150px` (multi-column layout). nimble's form styling may change radio/checkbox appearance. Verify.
247
247
-**Progressive enhancement** — `.js-only` / `.no-js-only` classes toggled on `<html>`. No conflict with nimble.
12. Kept all `pre`/`pre code` styles on sherpa and local-setup (project adds border, specific font)
578
578
13. Kept `.copy-btn` overlay styles on sherpa/local-setup (positioned absolute, white background — intentionally different from standard buttons)
579
579
580
-
**Content width:** Using nimble default (`60ch` ≈ 720px) instead of original `640px`. Wider but not dramatically different — can set `--nc-content-width: 640px` if needed.
580
+
**Content width:** Using nimble default (`60ch`) instead of original `640px`. Wider but not dramatically different — can set `--nc-content-width: 640px` if needed.
581
581
582
582
**TranscriptArea:**`.no-nimble` turned out to be unnecessary — the component's scoped styles (`.input`, `.preview`) explicitly set every property that matters (padding, margin, font, border, background, width, position) and beat nimble's `:where()` selectors. The debug `<details>` inside the component gets nimble's details styling (border, animation) which is a visual improvement.
0 commit comments