Skip to content

Commit 9c1a940

Browse files
committed
add changeset
1 parent 714e856 commit 9c1a940

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.changeset/poor-balloons-jam.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@primer/react-brand': patch
3+
---
4+
5+
Fix layout shift in `SubNav` by ensuring separator visibility is determined pre-hydration.

packages/react/src/SubNav/SubNav.module.css

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@
279279
animation: fade-in 0.3s var(--brand-animation-easing-glide) forwards;
280280
}
281281

282-
.SubNav__heading-separator--main.SubNav__heading-separator--has-adjacent-label,
282+
.SubNav__heading-separator--main:not(.SubNav__heading-separator--has-adjacent-label),
283283
.SubNav__heading-separator--subheading-active,
284284
.SubNav__subheading-container-active {
285285
display: none;
@@ -296,10 +296,6 @@
296296
z-index: 9998;
297297
}
298298

299-
.SubNav__heading-separator:not(.SubNav__heading-separator--has-adjacent-label) {
300-
display: none;
301-
}
302-
303299
.SubNav__links-overlay {
304300
position: relative;
305301
display: flex;

0 commit comments

Comments
 (0)