Skip to content

Commit 90a879e

Browse files
committed
docs: update README and demo for .bleed-* class rename and 60ch default
1 parent 146f343 commit 90a879e

4 files changed

Lines changed: 14 additions & 13 deletions

File tree

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,15 @@ That's it. Write semantic HTML and it just works.
9292

9393
## Utility Classes
9494

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`.
9696

9797
| Class | Description |
9898
|---|---|
9999
| `.fluid` | Full viewport width with padding (opt out of centering) |
100100
| `.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) |
103104
| `.striped` | Striped table rows (apply to table wrapper) |
104105
| `.visually-hidden` | Hidden visually, accessible to screen readers |
105106
| `.overflow-auto` | Scrollable container |
@@ -109,19 +110,19 @@ Content is centered at `720px` by default — no class needed. These opt-in util
109110
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:
110111

111112
```html
112-
<main class="fluid full-bleed">
113+
<main class="fluid bleed-full">
113114
<h1>Styled by nimble</h1>
114115

115116
<!-- Third-party component: nimble styles don't apply inside -->
116-
<div class="no-nimble full-bleed">
117+
<div class="no-nimble bleed-full">
117118
<ThirdPartyDataTable />
118119
</div>
119120
</main>
120121
```
121122

122123
**What's excluded:** Typography, links, buttons, forms, tables, code, media, article, details, dialog, and non-layout utilities.
123124

124-
**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.
125126

126127
This works via CSS `@scope` (Chrome 118+, Safari 17.4+, Firefox 128+). To disable scoping entirely (smaller output, no opt-out):
127128

@@ -161,7 +162,7 @@ Override at runtime — no build step needed. Hover and focus states auto-derive
161162
/* Layout */
162163
--nc-spacing: 1rem;
163164
--nc-radius: 0.25rem;
164-
--nc-content-width: 720px;
165+
--nc-content-width: 60ch;
165166
}
166167
```
167168

@@ -219,7 +220,7 @@ Build a CSS file with new defaults. SCSS-unique options listed first; the rest m
219220
// Layout
220221
$spacing: 1rem,
221222
$radius: 0.25rem,
222-
$content-width: 720px,
223+
$content-width: 60ch,
223224
);
224225
```
225226

demo/extended.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ <h3>Striped Table</h3>
234234
<!-- ============================================================ -->
235235
<section id="layout">
236236
<h2>Layout Utilities</h2>
237-
<p>The default body grid centers content at <code>--nc-content-width</code> (720px). These utilities break out of the center column.</p>
237+
<p>The default body grid centers content at <code>--nc-content-width</code> (60ch). These utilities break out of the center column.</p>
238238
</section>
239239
</main>
240240

specs/pico-migration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ Content is always centered with real padding. No breakpoints needed. This means:
261261
- The `.container` class exists but serves a different purpose (re-centering inside `.fluid` layouts).
262262
- Breakout content uses `.bleed-edge` (shadow boundary), `.bleed-wide` (1200px), or `.bleed-full` (viewport).
263263

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` (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`).
265265

266266
### 3.3 Container Width
267267

specs/vanilla-migration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Projects with form elements (rift-transcription, veneer, weather-sense) have han
129129
- Create or update `src/app.css` with nimble import
130130
- Update `+layout.svelte` to import app.css
131131
- 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)
133133
- Possibly add `.no-nimble` on TranscriptArea container
134134
- Remove or reduce custom form styles that nimble now provides
135135

@@ -241,7 +241,7 @@ Projects with form elements (rift-transcription, veneer, weather-sense) have han
241241
- **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.
242242
- **`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.
243243
- **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.
245245
- **CSS `light-dark()` function** — Project uses this modern CSS feature for dark mode. nimble also uses `light-dark()`. Good alignment.
246246
- **Config page form controls** — Radio button groups use CSS `columns: 150px` (multi-column layout). nimble's form styling may change radio/checkbox appearance. Verify.
247247
- **Progressive enhancement**`.js-only` / `.no-js-only` classes toggled on `<html>`. No conflict with nimble.
@@ -577,7 +577,7 @@ Layout utilities (`.fluid`, `.bleed-edge`, `.bleed-wide`, `.bleed-full`, `.conta
577577
12. Kept all `pre`/`pre code` styles on sherpa and local-setup (project adds border, specific font)
578578
13. Kept `.copy-btn` overlay styles on sherpa/local-setup (positioned absolute, white background — intentionally different from standard buttons)
579579

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.
581581

582582
**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.
583583

0 commit comments

Comments
 (0)