Fix bug that project name could overlap with logo

pull/6274/head
Wieland Lindenthal 7 years ago
parent d904bd6a9b
commit 16d19f68cd
  1. 19
      app/assets/stylesheets/layout/_top_menu.sass
  2. 8
      app/assets/stylesheets/layout/_top_menu_mobile.sass

@ -26,11 +26,14 @@
// See docs/COPYRIGHT.rdoc for more details.
//++
$hamburger-right: -3px
$hamburger-width: 50px
#logo
width: 230px
@include varprop(height, header-height)
position: absolute
left: calc(50% - #{$main-menu-width} / 2)
left: calc(50% - 230px / 2)
.home-link
margin-top: 14px
@ -252,10 +255,11 @@ input.top-menu-search--input
#account-nav-left
.drop-down
// Half viewport width minus half logo.
max-width: calc((100vW/2) - 115px)
max-width: calc((100vW/2) - 115px - #{$hamburger-width + $hamburger-right})
.nosidebar &
max-width: calc((100vW/2) - 115px)
#projects-menu
padding-right: 15px
padding-right: 30px
font-weight: bold
padding-left: 6px
.nosidebar &
@ -264,9 +268,11 @@ input.top-menu-search--input
.button--dropdown-text
float: left
// Half viewport width minus half logo minus margins.
max-width: calc((100vW/2) - 115px - 50px)
text-overflow: ellipsis
overflow: hidden
max-width: calc((100vW/2) - 115px - 50px - #{$hamburger-width + $hamburger-right})
.nosidebar &
max-width: calc((100vW/2) - 115px - 50px)
&:after
position: absolute
@ -307,9 +313,6 @@ input.top-menu-search--input
top: -3px
z-index: 10
$hamburger-right: -3px
$hamburger-width: 50px
#main-menu-toggle
display: block
width: $hamburger-width

@ -107,14 +107,14 @@
.button--dropdown-text
// Viewport minus #account-nav-right when logged out, which is
// 165px, as this is the space for the long login text label: "Connexion" (French).
// 21px is the padding around the project name.
max-width: calc(100vW - 165px - 21px - #{$hamburger-width} + (-1 * #{$hamburger-right}))
// 36px is the padding around the project name.
max-width: calc(100vW - 165px - 36px - #{$hamburger-width + $hamburger-right})
.nosidebar &
max-width: calc(100vW - 165px - 21px)
max-width: calc(100vW - 165px - 36px)
.drop-down
// Viewport minus #account-nav-right when logged out
// 165px as this is the space for the long login text label: "Connexion" (French)
max-width: calc(100vW - 165px - #{$hamburger-width} + (-1 * #{$hamburger-right}))
max-width: calc(100vW - 165px - #{$hamburger-width + $hamburger-right})
.nosidebar &
max-width: calc(100vW - 165px)
ul

Loading…
Cancel
Save