Skip to content

feat: add ## {.row} flex layout primitive with alignment support#22

Merged
teezeit merged 1 commit into
mainfrom
feature/rows
Apr 21, 2026
Merged

feat: add ## {.row} flex layout primitive with alignment support#22
teezeit merged 1 commit into
mainfrom
feature/rows

Conversation

@teezeit
Copy link
Copy Markdown
Owner

@teezeit teezeit commented Apr 21, 2026

Summary

  • Adds {.row} heading syntax — ## Toolbar {.row} creates a horizontal flex row; content is auto-wrapped as implicit flex items (no ### needed)
  • Per-item alignment via ### {.left} / ### {.center} / ### {.right} on explicit children (works in both {.row} and {.grid-N})
  • Row-level alignment via {.right} / {.center} on the ## heading maps to justify-content
  • Fixes duplicate CSS class names on row/grid/tabs nodes (syntactic class names were leaking into props.classes)
  • Fixes empty <h2> terminators being rendered as blank heading elements
  • Wires up row node rendering in React and Tailwind renderers

Test plan

  • 563 tests pass (npm test)
  • ## {.row} parses to row AST node with implicit grid-item children
  • ## {.row} inside :::card and other containers renders correctly
  • {.left} / {.right} / {.center} on ### items render correct alignment classes
  • Row-level {.right} / {.center} render justify-end / justify-center in Tailwind output
  • No duplicate CSS classes on wmd-row, wmd-grid, wmd-tabs elements
  • React and Tailwind renderers produce correct output for row nodes

🤖 Generated with Claude Code

Introduces `{.row}` as a new layout heading syntax alongside `{.grid-N}`.
Content directly under `## {.row}` is auto-wrapped as implicit flex items;
`###` children are supported for per-item `{.left}`/`{.center}`/`{.right}`
alignment. Row-level `{.right}` and `{.center}` map to justify-content.

Also fixes duplicate CSS class names on row/grid/tabs nodes (syntactic
class names were leaking into props.classes), suppresses empty `<h2>`
terminators from rendering, and wires up row rendering in the React and
Tailwind renderers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@teezeit teezeit merged commit 51d44b1 into main Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant