feat: add sidebar and breadcrumb CSS exports #3

Closed
opened 2026-05-15 00:11:17 +00:00 by brendan · 1 comment
Owner

Goal

Add layout component styles to the package so projects can import canonical sidebar and breadcrumb CSS from @bchen/ui rather than writing them locally.

New files

dist/sidebar.css

Structural styles for the desktop sidebar layout:

  • Grid or flex body layout placing the sidebar beside <main> at ≥ 768px
  • Sidebar width (~180–200px), fixed/sticky positioning
  • Nav link styles (hover, focus)
  • Active-nav indicator (e.g. font-weight or accent dot)
  • @media (max-width: 767px) — sidebar hidden, top bar shown instead

dist/breadcrumb.css

  • Separator between crumb segments (/ or )
  • Muted small-text typography consistent with the token palette
  • aria-current="page" styling for the current segment (plain text, no underline)

Package exports

Add to package.json:

"./sidebar.css":     "./dist/sidebar.css",
"./breadcrumb.css":  "./dist/breadcrumb.css"

Tests

Add snapshot or string-contains tests in tests/ verifying the new CSS files export non-empty content and reference the expected token variables (e.g. --fg, --bg, --accent).

## Goal Add layout component styles to the package so projects can import canonical sidebar and breadcrumb CSS from `@bchen/ui` rather than writing them locally. ## New files ### `dist/sidebar.css` Structural styles for the desktop sidebar layout: - Grid or flex body layout placing the sidebar beside `<main>` at `≥ 768px` - Sidebar width (~180–200px), fixed/sticky positioning - Nav link styles (hover, focus) - Active-nav indicator (e.g. font-weight or accent dot) - `@media (max-width: 767px)` — sidebar hidden, top bar shown instead ### `dist/breadcrumb.css` - Separator between crumb segments (`/` or `›`) - Muted small-text typography consistent with the token palette - `aria-current="page"` styling for the current segment (plain text, no underline) ## Package exports Add to `package.json`: ```json "./sidebar.css": "./dist/sidebar.css", "./breadcrumb.css": "./dist/breadcrumb.css" ``` ## Tests Add snapshot or string-contains tests in `tests/` verifying the new CSS files export non-empty content and reference the expected token variables (e.g. `--fg`, `--bg`, `--accent`).
brendan added the feature label 2026-05-15 00:11:17 +00:00
Author
Owner

Resolved: PR #5 (merge_commit 4a1a01347c)

Resolved: PR https://gitea.bchen.dev/brendan/bchen-ui/pulls/5 (merge_commit 4a1a01347c1b73870327e496e3fed46e19ed1d90)
Sign in to join this conversation.