From 3a7850cd02a5ef6cc664b038fc02fffc85e07d14 Mon Sep 17 00:00:00 2001 From: Sven Fuchs Date: Mon, 12 Nov 2012 12:12:57 +0100 Subject: [PATCH] abstract out styles for menu from profile --- assets/scripts/app/views/top.coffee | 2 +- assets/styles/top.sass | 59 +++++++++++++++++------------ 2 files changed, 36 insertions(+), 25 deletions(-) diff --git a/assets/scripts/app/views/top.coffee b/assets/scripts/app/views/top.coffee index dcf9b24d..f17478a4 100644 --- a/assets/scripts/app/views/top.coffee +++ b/assets/scripts/app/views/top.coffee @@ -19,7 +19,7 @@ ).property('tab') classProfile: (-> - classes = ['profile'] + classes = ['profile menu'] classes.push('active') if @get('tab') == 'profile' classes.push(Travis.app.get('authState')) classes.join(' ') diff --git a/assets/styles/top.sass b/assets/styles/top.sass index e44eeae2..be6556a3 100644 --- a/assets/styles/top.sass +++ b/assets/styles/top.sass @@ -28,14 +28,42 @@ &:hover color: $color-link-top-highlight - .profile + .menu position: relative - float: right .handle margin: 0 - .signed-out, .signing-in, .signed-in + &:hover > ul + display: block + + ul + display: none + position: absolute + z-index: 300 + top: 40px + width: 100% + background-color: $color-bg-dropdown + @include border-bottom-radius(6px) + @include single-box-shadow(rgba(black, 0.3), 2px, 2px, 10px) + + li + display: block + &:last-child a:hover + @include border-bottom-radius(4px) + + a + display: block + line-height: 24px + white-space: nowrap + padding: 5px 25px + &:hover + background-color: $color-bg-dropdown-highlight + + .menu.profile + float: right + + .handle > * display: none padding: 0 15px 0 45px .signed-out, .signing-in @@ -58,32 +86,15 @@ height: 22px @include border-radius(3px) - &.signed-in:hover > ul - display: block - ul - display: none - position: absolute - z-index: 300 - top: 40px - width: 100% min-width: 145px - background-color: $color-bg-dropdown - @include border-bottom-radius(6px) - @include single-box-shadow(rgba(black, 0.3), 2px, 2px, 10px) - - li - display: block - &:last-child a:hover - @include border-bottom-radius(4px) a - display: block padding: 5px 25px 5px 45px - line-height: 24px - white-space: nowrap - &:hover - background-color: $color-bg-dropdown-highlight + + &:not(.signed-in):hover ul + display: none + #home #navigation .home, #stats #navigation .stats,