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
9.**Double padding from `.container` on body-grid child** — `<main class="container">` carried over from Pico migration. Pico's `.container` provided both centering and `padding-inline`. nimble's body grid already centers `<main>` in the content column (with `--nc-spacing` gap baked into the column formula), so `.container` added a second `padding-inline: --nc-spacing`. **Fix:** remove `class="container"` from `<main>`. (Issue #13)
740
+
739
741
**Issues NOT encountered:**
740
742
-`[role="group"]` button groups transfer cleanly — nimble's partial-height dividers are an improvement over Pico's approach
741
743
-`<details>`/`<summary>` accordion works with nimble's open/close animation
@@ -844,3 +846,21 @@ nimble buttons have `border: 1px solid` on all four sides. When buttons are laid
844
846
-`$primary-hue: 250` SCSS customization works correctly via `@use ... with (...)`
845
847
846
848
**Significance:** This migration drove the creation of nimble.css's `@scope`-based `.no-nimble` opt-out feature (v0.7.0). It validated the global-vs-scopeable architecture split and confirmed that layout utilities must remain global while component styles are scoped.
849
+
850
+
### Issue 13: `.container` on a body-grid child causes double padding
851
+
852
+
**Severity:** Migration friction
853
+
**Status:** Fixed in multi-launch (app-side)
854
+
855
+
Pico's `.container` provided both centering (`max-width` + `margin-inline: auto`) and horizontal breathing room (`padding-inline`). Projects migrating from Pico often retain `class="container"` on `<main>` or other body-grid children.
856
+
857
+
In nimble, the body grid already provides the horizontal gap: the column formula `min(--nc-content-width, calc(100% - 2 * --nc-spacing))` guarantees `--nc-spacing` clearance from the viewport/shadow edge. nimble applies no styles to `<main>` by default. Adding `.container` (which sets `padding-inline: var(--nc-spacing)`) on top of the grid column creates a second layer of inset, visually doubling the side padding.
858
+
859
+
**Fix:** Remove `class="container"` from direct body-grid children (`<main>`, `<div>`, etc.). The body grid handles centering; `.container` is only needed inside `.fluid` layouts to re-introduce a centered max-width.
860
+
861
+
```diff
862
+
- <main class="container">
863
+
+ <main>
864
+
```
865
+
866
+
**Note:** This only affects elements that are direct children of `<body>` (or framework wrappers like SvelteKit's `display: contents` div). Inner elements with their own `max-width` and no `margin-inline: auto` are a different issue — see §3.8.
0 commit comments