From 1625ad623681ec82cb00ac0d9900409b9b89aa20 Mon Sep 17 00:00:00 2001 From: Yuki Date: Wed, 22 Apr 2015 03:55:11 +0530 Subject: [PATCH] No need to work on the first-child, work on the li directly --- app/assets/stylesheets/scss/navbar.scss | 52 ++++++++++--------------- 1 file changed, 21 insertions(+), 31 deletions(-) diff --git a/app/assets/stylesheets/scss/navbar.scss b/app/assets/stylesheets/scss/navbar.scss index 249e28c9..aa851a3a 100644 --- a/app/assets/stylesheets/scss/navbar.scss +++ b/app/assets/stylesheets/scss/navbar.scss @@ -134,42 +134,32 @@ } nav.navbar .nav > li:not(.profile--image-dropdown) { - & > *:first-child { - -moz-osx-font-smoothing: grayscale; - position: relative; + -moz-osx-font-smoothing: grayscale; + position: relative; + &:before { + content: ""; + position: absolute; + left: 0; + right: 0; + bottom: 0; + background: $navbar-inverse-link-color; + height: 0px; + -webkit-transition-property: height; + transition-property: height; + -webkit-transition-duration: 0.3s; + transition-duration: 0.3s; + -webkit-transition-timing-function: ease-out; + transition-timing-function: ease-out; + } + + &:hover, &:focus, &:active { &:before { - content: ""; - position: absolute; - left: 0; - right: 0; - bottom: 0; - background: $navbar-inverse-link-color; - height: 0px; - -webkit-transition-property: height; - transition-property: height; - -webkit-transition-duration: 0.3s; - transition-duration: 0.3s; - -webkit-transition-timing-function: ease-out; - transition-timing-function: ease-out; - } - - &:hover, &:focus, &:active { - &:before { - height: 4px - } + height: 4px } } - &.active *:first-child:before { + &.active:before { height: 4px; } - - & > .btn { - line-height: 50px; - width: 44px; - margin: 0; - border: 0; - padding: 0; - } }