Commit 479e0ccd authored by Mark Otto's avatar Mark Otto

add backwards compatability for dropdowns in topbar

parent 02abdd60
......@@ -6,7 +6,7 @@
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world @twitter by @mdo and @fat.
* Date: Fri Sep 2 00:01:01 PDT 2011
* Date: Fri Sep 2 00:28:51 PDT 2011
*/
/* Reset.less
* Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc).
......@@ -1102,21 +1102,6 @@ table .headerSortUp.purple, table .headerSortDown.purple {
z-index: 10000;
overflow: visible;
}
.topbar .fill {
background-color: #222;
background-color: #222222;
background-repeat: repeat-x;
background-image: -khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222));
background-image: -moz-linear-gradient(top, #333333, #222222);
background-image: -ms-linear-gradient(top, #333333, #222222);
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #222222));
background-image: -webkit-linear-gradient(top, #333333, #222222);
background-image: -o-linear-gradient(top, #333333, #222222);
background-image: linear-gradient(top, #333333, #222222);
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}
.topbar a {
color: #bfbfbf;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
......@@ -1193,60 +1178,77 @@ table .headerSortUp.purple, table .headerSortDown.purple {
-moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
}
.nav {
.topbar-inner, .topbar .fill {
background-color: #222;
background-color: #222222;
background-repeat: repeat-x;
background-image: -khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222));
background-image: -moz-linear-gradient(top, #333333, #222222);
background-image: -ms-linear-gradient(top, #333333, #222222);
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #222222));
background-image: -webkit-linear-gradient(top, #333333, #222222);
background-image: -o-linear-gradient(top, #333333, #222222);
background-image: linear-gradient(top, #333333, #222222);
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}
.topbar > ul, .nav {
display: block;
float: left;
margin: 0 10px 0 0;
position: relative;
left: 0;
}
.nav li {
.topbar > ul > li, .nav > li {
display: block;
float: left;
font-size: 13px;
}
.nav a {
.topbar > ul a, .nav a {
display: block;
float: none;
padding: 10px 10px 11px;
line-height: 19px;
text-decoration: none;
}
.nav a:hover {
.topbar > ul a:hover, .nav a:hover {
color: #fff;
text-decoration: none;
}
.nav .active a {
.topbar > ul .active a, .nav .active a {
background-color: #222;
background-color: rgba(0, 0, 0, 0.5);
}
.nav.secondary-nav {
.topbar > ul.secondary-nav, .nav.secondary-nav {
float: right;
margin-left: 10px;
margin-right: 0;
}
.nav.secondary-nav .dropdown-menu {
.topbar > ul.secondary-nav .dropdown-menu, .nav.secondary-nav .dropdown-menu {
right: 0;
}
.nav .dropdown-toggle:hover, .nav .dropdown.open .dropdown-toggle {
.topbar > ul .dropdown-toggle:hover,
.nav .dropdown-toggle:hover,
.topbar > ul .dropdown.open .dropdown-toggle,
.nav .dropdown.open .dropdown-toggle {
background: #444;
background: rgba(255, 255, 255, 0.05);
}
.nav .dropdown-menu {
.topbar > ul .dropdown-menu, .nav .dropdown-menu {
background-color: #333;
}
.nav .dropdown-menu .dropdown-toggle {
.topbar > ul .dropdown-menu .dropdown-toggle, .nav .dropdown-menu .dropdown-toggle {
color: #fff;
}
.nav .dropdown-menu .dropdown-toggle.open {
.topbar > ul .dropdown-menu .dropdown-toggle.open, .nav .dropdown-menu .dropdown-toggle.open {
background: #444;
background: rgba(255, 255, 255, 0.05);
}
.nav .dropdown-menu li a {
.topbar > ul .dropdown-menu li a, .nav .dropdown-menu li a {
color: #999;
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}
.nav .dropdown-menu li a:hover {
.topbar > ul .dropdown-menu li a:hover, .nav .dropdown-menu li a:hover {
background-color: #191919;
background-repeat: repeat-x;
background-image: -khtml-gradient(linear, left top, left bottom, from(#292929), to(#191919));
......@@ -1258,7 +1260,7 @@ table .headerSortUp.purple, table .headerSortDown.purple {
background-image: linear-gradient(top, #292929, #191919);
color: #fff;
}
.nav .dropdown-menu .divider {
.topbar > ul .dropdown-menu .divider, .nav .dropdown-menu .divider {
background-color: #222;
border-color: #444;
}
......@@ -1541,6 +1543,9 @@ footer {
-khtml-opacity: 0.65;
-moz-opacity: 0.65;
opacity: 0.65;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
.btn:active {
-webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
......
This diff is collapsed.
......@@ -34,7 +34,7 @@
<!-- Topbar
================================================== -->
<div class="topbar">
<div class="fill">
<div class="topbar-inner">
<div class="container">
<h3><a href="#">Bootstrap</a></h3>
<ul class="nav">
......@@ -909,7 +909,7 @@
<h2>Fixed topbar</h2>
<div class="topbar-wrapper" style="z-index: 5;">
<div class="topbar">
<div class="fill">
<div class="topbar-inner">
<div class="container">
<h3><a href="#">Project Name</a></h3>
<ul class="nav">
......@@ -942,7 +942,7 @@
</li>
</ul>
</div>
</div><!-- /fill -->
</div><!-- /topbar-inner -->
</div><!-- /topbar -->
</div><!-- /topbar-wrapper -->
......
......@@ -16,14 +16,6 @@
z-index: 10000;
overflow: visible;
// gradient is applied to it's own element because overflow visible is not honored by ie when filter is present
.fill {
background-color: #222;
#gradient > .vertical(#333, #222);
@shadow: 0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1);
.box-shadow(@shadow);
}
// Links get text shadow
a {
color: @grayLight;
......@@ -41,7 +33,7 @@
// Website name
h3 {
position:relative;
position: relative;
a {
float: left;
display: block;
......@@ -102,22 +94,31 @@
}
}
// gradient is applied to it's own element because overflow visible is not honored by ie when filter is present
.topbar-inner,
.topbar .fill { // For backwards compatability
background-color: #222;
#gradient > .vertical(#333, #222);
@shadow: 0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1);
.box-shadow(@shadow);
}
// NAVIGATION
// ----------
// Topbar Nav
// ul.nav for all topbar based navigation to avoid inheritance issues and over-specificity
.topbar > ul, // For backwards compatability
.nav {
display: block;
float: left;
margin: 0 10px 0 0;
position: relative;
left: 0;
li {
> li {
display: block;
float: left;
font-size: 13px;
}
a {
display: block;
......@@ -430,6 +431,7 @@ footer {
cursor: default;
background-image: none;
.opacity(65);
.box-shadow(none);
}
&:active {
@shadow: inset 0 2px 4px rgba(0,0,0,.25), 0 1px 2px rgba(0,0,0,.05);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment