Skip to content

Commit db33624

Browse files
Clarify that the engine layout already wraps yield in .l-ui-page
Document that views must not add their own .l-ui-page wrapper, which would nest two containers. Note applies to both SKILL.md and the CSS reference.
1 parent 3234fa0 commit db33624

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

.claude/skills/layered-ui-rails/SKILL.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ Then render the engine layout from your application layout. Place all `content_f
3939

4040
The engine layout provides a fixed header (63px), optional sidebar navigation (256px wide), optional resizable panel (320px default), and a main content area. Dark mode is built in with a toggle and localStorage persistence.
4141

42+
**Your view's `yield` content is already wrapped in `.l-ui-page`** by the engine layout (which applies the responsive padding and `--with-navigation` margin). Do not add your own `.l-ui-page` wrapper around your view content - it duplicates the container and nests two `.l-ui-page` elements. Start your view with its actual content (headings, sections, components) directly.
43+
4244
### Content blocks
4345

4446
Populate layout regions with `content_for` (always above the render call):

.claude/skills/layered-ui-rails/references/CSS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ Applied to `<body>` via the `:l_ui_body_class` yield to toggle layout-level beha
3636
.l-ui-page__width-constrained Max-width container element
3737
```
3838

39+
`.l-ui-page` (and `--with-navigation`) is applied by the engine layout around your view's `yield` - you do not add it yourself. Wrapping your view content in another `.l-ui-page` nests two containers. The `__vertically-centered` and `__width-constrained` elements are used *inside* views (e.g. the Devise auth pages) for centred, width-limited content.
40+
3941
## Buttons
4042

4143
Always combine the `l-ui-button` base class with a colour modifier (e.g. `l-ui-button l-ui-button--primary`):

0 commit comments

Comments
 (0)