Fix navbar + menu flashing on page load (#31281) (#31342)

Backport #31281 by silverwind

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Giteabot 2024-06-12 23:26:04 +08:00 committed by GitHub
parent b1ad8ccb73
commit 4b6ef9265b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 46 additions and 28 deletions

View file

@ -134,12 +134,6 @@ h4.ui.header .sub.header {
font-weight: var(--font-weight-normal);
}
/* open dropdown menus to the left in right-attached headers */
.ui.attached.header > .ui.right .ui.dropdown .menu {
right: 0;
left: auto;
}
/* if a .top.attached.header is followed by a .segment, add some margin */
.ui.segments + .ui.top.attached.header,
.ui.attached.segment + .ui.top.attached.header {

View file

@ -19,12 +19,26 @@
margin: 0;
display: flex;
align-items: center;
gap: 5px;
}
#navbar-logo {
margin: 0;
}
.navbar-left > .item,
.navbar-right > .item {
color: var(--color-nav-text);
position: relative;
text-decoration: none;
line-height: var(--line-height-default);
flex: 0 0 auto;
font-weight: var(--font-weight-normal);
align-items: center;
padding: .78571429em .92857143em;
border-radius: .28571429rem;
}
#navbar .item {
min-height: 36px;
min-width: 36px;
@ -33,10 +47,6 @@
display: flex;
}
#navbar > .menu > .item {
color: var(--color-nav-text);
}
#navbar .dropdown .item {
justify-content: stretch;
}
@ -70,7 +80,7 @@
}
#navbar .navbar-mobile-right {
display: flex;
margin-left: auto !important;
margin: 0 0 0 auto !important;
width: auto !important;
}
#navbar .navbar-mobile-right > .item {