Skip to content

Commit 44028e7

Browse files
committed
Make header divider a single continuous line like Handsontable docs
The toolbar's horizontal divider was constructed from `border-top` on each `.hf-nav__link` element, so it only rendered where the framed nav tabs sat. To the left of the first tab and to the right of the Support dropdown, the line broke off and left visible gaps. Mirror Handsontable's `.header-row-2::before` pattern: add a single full-viewport `::before` pseudo-element to `.hf-header__row--nav` so a continuous 1px line stretches edge-to-edge. The per-tab top borders sit at the same Y-coordinate and overlap the pseudo-element where tabs exist; the pseudo-element bridges the gaps elsewhere. The active-tab brand-blue frame and z-index stacking are unchanged.
1 parent 720ff8a commit 44028e7

1 file changed

Lines changed: 24 additions & 3 deletions

File tree

docs/src/styles/components/header.css

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,11 @@ header.header {
5151
}
5252

5353
/*
54-
* No border-bottom here on purpose — the framed-tab strip below already
55-
* supplies the visual divider via its 1px gray-5 border-top, so an additional
56-
* row-1 hairline would double-stack into a 2px line.
54+
* The single horizontal divider that runs across the toolbar is rendered as
55+
* a `::before` pseudo-element on `.hf-header__row--nav` below. The framed
56+
* `.hf-nav__link` top borders overlap that line where tabs exist; the
57+
* pseudo-element fills the gaps to the viewport edges. Mirrors HT's
58+
* `.header-row-2::before`.
5759
*/
5860

5961
/* — Brand (logo + version pill) — */
@@ -138,6 +140,25 @@ header.header {
138140
/* — Primary nav (row 2) — */
139141
.hf-header__row--nav {
140142
background: var(--sl-color-bg-nav);
143+
position: relative;
144+
}
145+
146+
/*
147+
* Continuous full-viewport divider line. Mirrors HT's `.header-row-2::before`.
148+
* Each `.hf-nav__link` keeps its own 1px top border so the framed tabs read
149+
* as a segmented strip; this pseudo-element sits at the same Y-coordinate
150+
* and bridges the empty space to the left of the first tab and to the right
151+
* of the Support dropdown so the divider reads as one unbroken rule.
152+
*/
153+
.hf-header__row--nav::before {
154+
content: '';
155+
position: absolute;
156+
top: 0;
157+
left: 50%;
158+
transform: translateX(-50%);
159+
width: 100vw;
160+
height: 1px;
161+
background: var(--sl-color-gray-5);
141162
}
142163

143164
.hf-nav {

0 commit comments

Comments
 (0)