Skip to content

Commit 2df6d33

Browse files
committed
Reduce the height of wrapped navbar
Navbar items have been forced the header height. This means if they get wrapped because the window is not wide enough, the navbar will double its height. This costs a lot of vertical space, which is particularly annoying as screens with limited width typically also have limited height. This PR changes the behavior to not force the height. Additionally we set a small vertical margin so that it is ensured that items have a bit of space around them. This approach does not change the visible appearance of the navbar if everything fits in one line. But it reduces the vertical size of the navbar for wrapped content.
1 parent b55ec41 commit 2df6d33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pydata_sphinx_theme/assets/styles/sections/_header.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434

3535
// These items will define the height of the header
3636
.navbar-item {
37-
height: var(--pst-header-height);
3837
max-height: var(--pst-header-height);
38+
margin: 4px 0;
3939
display: flex;
4040
align-items: center;
4141
}

0 commit comments

Comments
 (0)