Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix navbar + menu flashing on page load #31281

Merged
merged 12 commits into from
Jun 12, 2024
2 changes: 1 addition & 1 deletion templates/base/head_navbar.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
<span class="only-mobile">{{ctx.Locale.Tr "create_new"}}</span>
</span>
<div class="menu left">
<div class="menu">
<a class="item" href="{{AppSubUrl}}/repo/create">
{{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}}
</a>
Expand Down
4 changes: 3 additions & 1 deletion web_src/css/modules/header.css
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ h4.ui.header .sub.header {
}

/* open dropdown menus to the left in right-attached headers */
.ui.attached.header > .ui.right .ui.dropdown .menu {
/* this method must be used instead of "left menu" because otherwise the menu will flash on page load. */
silverwind marked this conversation as resolved.
Show resolved Hide resolved
.ui.attached.header > .ui.right .ui.dropdown .menu,
.navbar-right .ui.dropdown .menu {
right: 0;
left: auto;
}
Expand Down