Last active
August 29, 2015 14:00
-
-
Save gpspake/11239576 to your computer and use it in GitHub Desktop.
Foundation top-bar-fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
*Sassified version of tmayr's gist: https://gist.github.com/tmayr/5190565 | |
* | |
*/ | |
.lt-ie9 { | |
.top-bar { | |
background: #2f2f2f; | |
*zoom: 1; | |
overflow: visible; | |
} | |
.top-bar:before, .top-bar:after { | |
content: " "; | |
display: table; | |
} | |
.top-bar:after { clear: both; } | |
.top-bar .toggle-topbar { display: none; } | |
.top-bar .title-area { float: left; } | |
.top-bar .name h1 a { width: auto; } | |
.top-bar input, | |
.top-bar .button { | |
line-height: 2em; | |
font-size: 0.875em; | |
height: 2em; | |
padding: 0 10px; | |
position: relative; | |
top: 8px; | |
} | |
.top-bar.expanded { background: #111111; } | |
.contain-to-grid .top-bar { | |
max-width: 57.5em; | |
margin: 0 auto; | |
} | |
.top-bar-section { | |
-webkit-transition: none 0 0; | |
-moz-transition: none 0 0; | |
transition: none 0 0; | |
left: 0 !important; | |
ul { | |
width: auto; | |
height: auto !important; | |
display: inline; | |
li { float: left; } | |
li > a { padding-right: 14px !important; } | |
li .js-generated { display: none; } | |
li a:not(.button) { | |
padding: 0 15px; | |
line-height: 45px; | |
background: #111111; | |
} | |
li a:not(.button):hover { background: #2b2b2b; } | |
} | |
.has-dropdown > a { padding-right: 35px !important; } | |
.has-dropdown > a:after { | |
content: ""; | |
display: block; | |
width: 0; | |
height: 0; | |
border: solid 5px; | |
border-color: rgba(255, 255, 255, 0.5) transparent transparent transparent; | |
margin-top: -2.5px; | |
} | |
.has-dropdown.moved { position: relative; } | |
.has-dropdown.moved > .dropdown { visibility: hidden; } | |
.has-dropdown:hover > .dropdown, | |
.has-dropdown:active > .dropdown { visibility: visible; } | |
.has-dropdown .dropdown li.has-dropdown > a:after { | |
border: none; | |
content: "\00bb"; | |
margin-top: -7px; | |
right: 5px; | |
} | |
.dropdown { | |
left: 0; | |
top: auto; | |
background: transparent; | |
li { | |
a { | |
line-height: 1; | |
white-space: nowrap; | |
padding: 7px 15px; | |
background: #1e1e1e; | |
} | |
label { | |
white-space: nowrap; | |
background: #1e1e1e; | |
} | |
.dropdown { | |
left: 100%; | |
top: 0; | |
} | |
} | |
} | |
> ul > .divider { | |
border-bottom: none; | |
border-top: none; | |
border-right: solid 1px #2b2b2b; | |
border-left: solid 1px black; | |
clear: none; | |
height: 45px; | |
width: 0px; | |
} | |
.has-form { | |
background: #111111; | |
padding: 0 15px; | |
height: 45px; | |
} | |
ul.right li .dropdown { | |
left: auto; | |
right: 0; | |
} | |
ul.right li .dropdown li .dropdown { right: 100%; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment