|
3 | 3 | > A plan and tracker for adding nimble.css to projects that use no CSS framework — just hand-written CSS, sanitize.css, and/or Open Props design tokens. |
4 | 4 |
|
5 | 5 | **Status:** Living document |
6 | | -**Last updated:** 2026-03-28 |
| 6 | +**Last updated:** 2026-03-30 |
7 | 7 |
|
8 | 8 | --- |
9 | 9 |
|
@@ -587,15 +587,95 @@ Layout utilities (`.fluid`, `.bleed-edge`, `.bleed-wide`, `.bleed-full`, `.conta |
587 | 587 |
|
588 | 588 | ### 6.2 gg |
589 | 589 |
|
590 | | -**Status:** Not started |
| 590 | +**Status:** Complete |
| 591 | +**Date:** 2026-03-28 |
| 592 | +**nimble.css version:** 0.9.0 |
| 593 | + |
| 594 | +**Changes made:** |
| 595 | +1. Added `@leftium/nimble.css` to `devDependencies` |
| 596 | +2. Created `src/app.css` with `@import '@leftium/nimble.css'` |
| 597 | +3. Updated `+layout.svelte` to import `app.css` |
| 598 | +4. Removed hand-rolled `:global(body)` reset (margin, font-family, line-height, color) |
| 599 | +5. Removed `.container` class with `max-width: 960px; margin: 0 auto; padding` — nimble's body grid handles centering |
| 600 | +6. Removed custom `h1` margin, `h3` margin, and generic `div` flex styles — nimble provides heading margins |
| 601 | +7. Removed custom button styles (padding, border, border-radius, background, color, hover, active states) — nimble provides button styling |
| 602 | +8. Removed `small` color rule — nimble handles it |
| 603 | +9. Added `.button-group` class for button rows (flex, wrap, gap) with `width: auto; margin-bottom: 0` on child buttons to override nimble's full-width form defaults |
| 604 | + |
| 605 | +**Eruda panel:** No conflicts — the Eruda plugin CSS is architecturally isolated in a separate DOM subtree, as predicted. |
| 606 | + |
| 607 | +**Content width:** Using nimble default (`60ch`) — wider than previous `960px` max-width but acceptable for the demo page. |
591 | 608 |
|
592 | 609 | ### 6.3 leftium-logo |
593 | 610 |
|
594 | | -**Status:** Not started |
| 611 | +**Status:** Complete |
| 612 | +**Date:** 2026-03-28 |
| 613 | +**nimble.css version:** 0.9.0 |
| 614 | + |
| 615 | +**Changes made:** |
| 616 | +1. Added `@leftium/nimble.css` to `devDependencies` |
| 617 | +2. Created `src/app.css` with `@import '@leftium/nimble.css'` |
| 618 | +3. Updated `+layout.svelte` to import `app.css` |
| 619 | +4. Removed hand-rolled `:global(body)` reset (margin, background-color, color) — kept `overflow: hidden` (project-specific, prevents scrolling on home page) |
| 620 | +5. Removed `:global(a)` / `:global(a:hover)` / `:global(a:visited)` link color rules and dark mode media query — nimble provides themed link colors with `light-dark()` |
| 621 | +6. Replaced PicoCSS `!important` defenses in `LeftiumLogo.svelte` with normal rules — nimble's `:where()` selectors have lower specificity than scoped styles, so `!important` is no longer needed: |
| 622 | + - `max-width: unset !important` → `max-width: unset` |
| 623 | + - `padding: 0 !important` → `padding: 0` |
| 624 | + - `border: none !important` → `border: none` |
| 625 | + - `border-radius: 0 !important` → `border-radius: 0` |
| 626 | + - `outline: none !important` → removed (kept plain `outline: none` in `:focus`) |
| 627 | + - `box-shadow: none !important` → `box-shadow: none` |
| 628 | +7. Set `--nc-content-width: 100vw` on home page to allow full-viewport logo display |
| 629 | +8. Simplified test index page (`/test`): |
| 630 | + - Removed `main` max-width/margin/padding/font-family — nimble's body grid handles it (kept `max-width: 800px; margin-inline: auto` on `main` for narrower test layout) |
| 631 | + - Removed `h1` color/text-align, `p` color/margin — nimble provides defaults |
| 632 | + - Replaced hardcoded colors (`#e0e0e0`, `#fafafa`, `#007acc`, `#f0f8ff`, `#333`, `#666`) with nimble CSS variables (`--nc-border`, `--nc-surface-2`, `--nc-primary`, `--nc-radius`) |
| 633 | + - Removed `a[href='/']` link styles — nimble handles links |
| 634 | + - Added `:global(body) { overflow-y: auto !important }` on test page (overrides home page's `overflow: hidden`) |
| 635 | +9. Adjusted label alignment: `align-items: baseline` → `align-items: first baseline`, radio inputs use `align-self: center`, added `margin-bottom: 0` on labels |
| 636 | + |
| 637 | +**`.no-nimble` on LeftiumLogo:** Not needed — replacing `!important` with normal declarations was sufficient since nimble's `:where()` selectors never win against scoped component styles. |
| 638 | + |
| 639 | +**Custom elements:** `<logo-container>` and `<grid-logo>` unaffected by nimble, as predicted. |
595 | 640 |
|
596 | 641 | ### 6.4 hn |
597 | 642 |
|
598 | | -**Status:** Not started |
| 643 | +**Status:** Complete |
| 644 | +**Date:** 2026-03-28 |
| 645 | +**nimble.css version:** 0.11.0 (migrated at 0.9.0, bumped through 0.10 → 0.11 same day) |
| 646 | + |
| 647 | +**Changes made (across 5 commits):** |
| 648 | + |
| 649 | +*Initial migration (v0.9.0):* |
| 650 | +1. Replaced `sanitize.css` with `@leftium/nimble.css` in `devDependencies` |
| 651 | +2. Rewrote `app.css`: replaced 20-line hand-written reset (color-scheme, max-width, margin, background, font-family, link colors) with nimble import + `--nc-content-width: min(42.875em, 100%)` |
| 652 | +3. Removed `sanitize.css` import from `+layout.svelte` |
| 653 | +4. Removed `<wrap-page>` wrapper element and its `box-shadow`/border styles — nimble's body grid handles centering |
| 654 | +5. Kept `open-props` imports and all `--size-*`, `--font-size-*`, `--font-weight-*`, `--shadow-*` tokens |
| 655 | +6. Config page: removed `max-width: 800px; margin: 0 auto` from `main` — nimble body grid handles it |
| 656 | +7. Config page: adjusted radio button alignment (`align-items: baseline` → `flex-start`, added `margin-top: 0.25em` on radio inputs) |
| 657 | +8. Config page: changed `input[type='radio']` from `margin-right` to `vertical-align: -0.2em` |
| 658 | +9. Config page: added explicit `color` rules on buttons/hover to override nimble's primary-contrast button color |
| 659 | +10. Story page: added `border-radius: 0`, `border: none`, `color: inherit`, and `transition: none` on scroll buttons to reset nimble's button styling |
| 660 | +11. Config page: added `align-self: center; margin: 0` on `.custom-time-label input[type='radio']` and `margin: 0` on datetime-local inputs |
| 661 | + |
| 662 | +*v0.10 content shadow:* |
| 663 | +12. Adopted nimble.css v0.10's content shadow feature — replaced `<wrap-page>` box-shadow with nimble's built-in `--nc-content-shadow-gap: 0px` for flush edge-to-edge layout |
| 664 | + |
| 665 | +*v0.11 bump:* |
| 666 | +13. Bumped to nimble.css v0.11, removed redundant max-width from settings page |
| 667 | + |
| 668 | +**Open Props coexistence:** Confirmed — no conflicts between `open-props` tokens (`--size-*`, `--font-size-*`, `--font-weight-*`, `--shadow-*`) and nimble's `--nc-*` namespace, as predicted from prior zbang/leftium.com migrations. |
| 669 | + |
| 670 | +**Custom elements:** `<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>` — all unaffected by nimble, as predicted. |
| 671 | + |
| 672 | +**Content width:** Preserved at `min(42.875em, 100%)` via `--nc-content-width`. |
| 673 | + |
| 674 | +**Issues found and fixed:** |
| 675 | +- Scroll buttons (previous/next day) inherited nimble's button border-radius and transition — fixed by resetting `border-radius: 0; border: none; transition: none` |
| 676 | +- Radio buttons in config page had alignment issues with nimble's form styling — fixed with `margin-top`, `vertical-align`, and `align-self` adjustments |
| 677 | +- Buttons had nimble's primary-contrast color instead of subtle gray — fixed by adding explicit `color` on button and button:hover |
| 678 | +- `<wrap-page>` box-shadow was replaced by nimble's content shadow feature (v0.10), with `--nc-content-shadow-gap: 0px` for flush layout |
599 | 679 |
|
600 | 680 | ### 6.5 weather-sense |
601 | 681 |
|
|
0 commit comments