From 2f1cb006b0bbdbfcc5e45569560f2d06252a490a Mon Sep 17 00:00:00 2001 From: grugbraindev <178141691+grugbraindev@users.noreply.github.com> Date: Fri, 23 Oct 2026 11:25:11 +0800 Subject: [PATCH] Style vertical separators in base CSS Add a low-specificity base rule so
renders as a 1px inline-start line that stretches to its row, matching shadcn/ui's vertical Separator. Rewrite the Separator docs to use it without utility classes, note role="none" for decorative separators, and add a changelog entry. --- CHANGELOG.md | 4 +++ site/src/docs/components/separator.mdx | 39 +++++++++++++++----------- src/css/base/base.css | 9 ++++++ 3 files changed, 36 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ceea18..26754f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## [Unreleased] +### Added + +- Added vertical separators: `
` renders as a 1px line that fills its row. + ### Fixed - Prevented Escape from dismissing an enclosing dialog while closing an open Combobox popup. diff --git a/site/src/docs/components/separator.mdx b/site/src/docs/components/separator.mdx index 1183a97..5277b99 100644 --- a/site/src/docs/components/separator.mdx +++ b/site/src/docs/components/separator.mdx @@ -27,24 +27,30 @@ Import Tailwind and one full Basecoat style bundle. @import "basecoat-css/vega.css"; ``` -Or import only the base CSS, which sets the border color. +Or import only the base CSS, which styles horizontal and vertical separators. ```css @import "tailwindcss"; @import "basecoat-css/base.css"; ``` -Separator is a native `
` plus Tailwind utilities and has no dedicated component CSS file. +Separator is a native `
` and has no dedicated component CSS file. Using CDN or bundler imports? See the [Installation page](/installation). -Use an `
`. Tailwind's preflight and Basecoat's base CSS render it as a 1px line in the `border` color, matching shadcn/ui's Separator. +Use an `
` with `role="separator"`. It renders as a 1px line in the `border` color, matching shadcn/ui's Separator. ```html
+``` + +If the separator is purely decorative, use `role="none"` instead so assistive technologies skip it. This is what shadcn/ui's `decorative` prop does. + +```html +
```
@@ -54,14 +60,14 @@ Use an `
`. Tailwind's preflight and Basecoat's base CSS render it as a 1px l ### Vertical -Add `aria-orientation="vertical"` and swap the top border for an inline-start border. `self-stretch` makes it fill the height of a flex row. +Add `aria-orientation="vertical"` for a vertical separator. It fills the height of its row.
Blog
- +
Docs
- +
Source
@@ -76,12 +82,12 @@ Vertical separators between menu items with descriptions. Settings Manage preferences - +
Account Profile & security
- +