0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00

fix up dropdowns and navbar docs for the new dropdown styles

This commit is contained in:
Mark Otto 2012-01-07 21:09:02 -08:00
parent 343dd9616d
commit 95f47026cf
6 changed files with 223 additions and 245 deletions

251
bootstrap.css vendored
View File

@ -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: Sat Jan 7 20:25:41 PST 2012
* Date: Sat Jan 7 20:56:31 PST 2012
*/
html, body {
margin: 0;
@ -1441,7 +1441,7 @@ i {
margin-top: 8px;
margin-left: 2px;
}
.dropdown:hover .caret {
.dropdown:hover .caret, .open.dropdown .caret {
filter: alpha(opacity=100);
-moz-opacity: 1;
opacity: 1;
@ -1709,7 +1709,88 @@ i {
display: block;
float: left;
margin: 0 10px 0 0;
/* // Dropdowns within the .nav
}
.navbar .nav.pull-right {
float: right;
}
.navbar .nav > li {
display: block;
float: left;
}
.navbar .nav > li > a {
float: none;
padding: 10px 10px 11px;
line-height: 19px;
color: #999999;
text-decoration: none;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.navbar .nav > li > a:hover {
background-color: transparent;
color: #ffffff;
text-decoration: none;
}
.navbar .nav .active > a {
background-color: #222;
background-color: rgba(0, 0, 0, 0.5);
}
.navbar .vertical-divider {
height: 40px;
width: 1px;
margin: 0 5px;
overflow: hidden;
background-color: #222;
border-right: 1px solid #444;
}
.navbar .nav.pull-right {
margin-left: 10px;
margin-right: 0;
}
.navbar .dropdown-menu {
top: 42px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.navbar .dropdown-menu:before {
content: '';
display: inline-block;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-bottom: 7px solid #ccc;
border-bottom-color: rgba(0, 0, 0, 0.1);
position: absolute;
top: -7px;
left: 12px;
}
.navbar .dropdown-menu:after {
content: '';
display: inline-block;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid #fff;
position: absolute;
top: -6px;
left: 13px;
}
.navbar .dropdown-toggle .caret, .navbar .open.dropdown .caret {
border-top-color: #fff;
}
.navbar .open .dropdown-toggle {
background-color: transparent;
}
.navbar .nav.pull-right .dropdown-menu {
right: 0;
}
.navbar .nav.pull-right .dropdown-menu:before {
left: auto;
right: 12px;
}
.navbar .nav.pull-right .dropdown-menu:after {
left: auto;
right: 13px;
}
/* // Dropdowns within the .nav
.dropdown-toggle:hover,
.dropdown.open .dropdown-toggle {
background: #444;
@ -1741,45 +1822,6 @@ i {
border-color: #444;
}
}*/
}
.navbar .nav > li {
display: block;
float: left;
}
.navbar .nav a {
float: none;
padding: 10px 10px 11px;
line-height: 19px;
color: #999999;
text-decoration: none;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.navbar .nav a:hover {
color: #ffffff;
text-decoration: none;
}
.navbar .nav .active > a {
background-color: #222;
background-color: rgba(0, 0, 0, 0.5);
}
.navbar .nav .vertical-divider {
height: 40px;
width: 1px;
margin: 0 5px;
overflow: hidden;
background-color: #222;
border-right: 1px solid #444;
}
.navbar .nav.secondary-nav {
float: right;
margin-left: 10px;
margin-right: 0;
}
.navbar .nav.secondary-nav .dropdown-menu {
right: 0;
border: 0;
}
.nav {
margin-left: 0;
margin-bottom: 18px;
@ -2042,130 +2084,7 @@ i {
.tab-content > .active, .pill-content > .active {
display: block;
}
.step-nav {
position: relative;
margin: 0 0 18px;
list-style: none;
line-height: 30px;
text-align: center;
background-color: #f5f5f5;
-webkit-border-radius: 15px;
-moz-border-radius: 15px;
border-radius: 15px;
}
.step-nav li {
display: inline;
color: #999999;
}
.step-nav .prev, .step-nav .next {
position: absolute;
top: 6px;
}
.step-nav .prev {
left: 15px;
}
.step-nav .next {
right: 15px;
}
.step-nav .dot {
display: inline-block;
width: 10px;
height: 10px;
margin: 0 3px;
text-indent: -999em;
background-color: #999999;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.25);
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.25);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.25);
}
.step-nav .dot:hover, .step-nav .active .dot {
background-color: #333333;
}
.subnav {
background-color: #eeeeee;
background-image: -khtml-gradient(linear, left top, left bottom, from(#f5f5f5), to(#eeeeee));
background-image: -moz-linear-gradient(top, #f5f5f5, #eeeeee);
background-image: -ms-linear-gradient(top, #f5f5f5, #eeeeee);
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f5f5f5), color-stop(100%, #eeeeee));
background-image: -webkit-linear-gradient(top, #f5f5f5, #eeeeee);
background-image: -o-linear-gradient(top, #f5f5f5, #eeeeee);
background-image: linear-gradient(top, #f5f5f5, #eeeeee);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#eeeeee', GradientType=0);
-webkit-box-shadow: inset 0 1px 0 #ffffff, 0 0 5px rgba(0, 0, 0, 0.5);
-moz-box-shadow: inset 0 1px 0 #ffffff, 0 0 5px rgba(0, 0, 0, 0.5);
box-shadow: inset 0 1px 0 #ffffff, 0 0 5px rgba(0, 0, 0, 0.5);
}
.subnav a {
padding: 8px 10px;
font-size: 12px;
color: #0088cc;
text-shadow: 0 1px 0 #fff;
border-left: 1px solid #f9f9f9;
border-right: 1px solid #e5e5e5;
}
.subnav a:hover {
color: #005580;
background-color: #eee;
}
.subnav li:first-child a {
border-left: 0;
-webkit-border-radius: 6px 0 0 6px;
-moz-border-radius: 6px 0 0 6px;
border-radius: 6px 0 0 6px;
}
.subnav li:last-child a {
border-right: 0;
-webkit-border-radius: 0 6px 6px 0;
-moz-border-radius: 0 6px 6px 0;
border-radius: 0 6px 6px 0;
}
.subnav ul .active > a {
color: #333333;
background-color: #eee;
}
/*.side-nav {
padding: @baseLineHeight / 2 0;
}
.side-nav .nav-label,
.side-nav .nav-item {
display: block;
padding: 3px 15px;
text-shadow: 0 1px 0 rgba(255,255,255,.5);
}
.side-nav .nav-label {
font-size: 11px;
line-height: @baseLineHeight;
color: @grayLight;
text-transform: uppercase;
}
.side-nav .nav-group {
margin: 0; // clear default ul margins
list-style: none;
}
.side-nav .nav-group + .nav-label {
margin-top: 9px;
}
.side-nav .nav-item {
font-weight: bold;
}
.side-nav .nav-item i {
vertical-align: -2px;
}
.side-nav .nav-item:hover {
text-decoration: none;
}
.side-nav .active .nav-item {
color: #fff;
text-shadow: 0 -1px 0 rgba(0,0,0,.3);
#gradient > .vertical(#ccc, #999);
@shadow: inset 0 1px 0 rgba(0,0,0,.05), inset 0 -1px 0 rgba(0,0,0,.05);
.box-shadow(@shadow);
}*/.breadcrumb {
.breadcrumb {
padding: 7px 14px;
margin: 0 0 18px;
background-color: #f5f5f5;

29
bootstrap.min.css vendored
View File

@ -302,7 +302,7 @@ i{background-image:url(docs/assets/img/glyphicons-halflings-sprite.png);backgrou
.dropdown{position:relative;}
.caret{display:inline-block;width:0;height:0;text-indent:-99999px;vertical-align:top;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #000;filter:alpha(opacity=30);-moz-opacity:0.3;opacity:0.3;content:"\2193";}
.dropdown .caret{margin-top:8px;margin-left:2px;}
.dropdown:hover .caret{filter:alpha(opacity=100);-moz-opacity:1;opacity:1;}
.dropdown:hover .caret,.open.dropdown .caret{filter:alpha(opacity=100);-moz-opacity:1;opacity:1;}
.dropdown-menu{position:absolute;top:40px;z-index:1000;float:left;display:none;min-width:160px;max-width:220px;_width:160px;padding:5px 0;margin:0;list-style:none;background-color:#ffffff;border-color:#999;border-color:rgba(0, 0, 0, 0.1);border-style:solid;border-width:1px;-webkit-border-radius:0 0 5px 5px;-moz-border-radius:0 0 5px 5px;border-radius:0 0 5px 5px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;zoom:1;}.dropdown-menu .divider{height:1px;margin:5px 1px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #ffffff;}
.dropdown-menu a{display:block;padding:2px 15px;clear:both;font-weight:normal;line-height:18px;color:#555555;}.dropdown-menu a:hover{color:#fff;text-decoration:none;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#0064cd;background-image:-khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));background-image:-moz-linear-gradient(top, #049cdb, #0064cd);background-image:-ms-linear-gradient(top, #049cdb, #0064cd);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));background-image:-webkit-linear-gradient(top, #049cdb, #0064cd);background-image:-o-linear-gradient(top, #049cdb, #0064cd);background-image:linear-gradient(top, #049cdb, #0064cd);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);background-color:#0077b3;background-image:-khtml-gradient(linear, left top, left bottom, from(#0088cc), to(#0077b3));background-image:-moz-linear-gradient(top, #0088cc, #0077b3);background-image:-ms-linear-gradient(top, #0088cc, #0077b3);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #0088cc), color-stop(100%, #0077b3));background-image:-webkit-linear-gradient(top, #0088cc, #0077b3);background-image:-o-linear-gradient(top, #0088cc, #0077b3);background-image:linear-gradient(top, #0088cc, #0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0077b3', GradientType=0);-webkit-box-shadow:inset 0 1px 0 rgba(0, 0, 0, 0.075),inset 0 -1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 0 rgba(0, 0, 0, 0.075),inset 0 -1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 0 rgba(0, 0, 0, 0.075),inset 0 -1px rgba(0, 0, 0, 0.075);}
.dropdown.open .dropdown-toggle{color:#ffffff;background:#ccc;background:rgba(0, 0, 0, 0.3);}
@ -325,11 +325,20 @@ i{background-image:url(docs/assets/img/glyphicons-halflings-sprite.png);backgrou
.navbar-static{margin-bottom:18px;}
.navbar-static .navbar-inner{padding-left:20px;padding-right:20px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
.navbar-fixed{position:fixed;top:0;right:0;left:0;z-index:1010;}
.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0;}.navbar .nav>li{display:block;float:left;}
.navbar .nav a{float:none;padding:10px 10px 11px;line-height:19px;color:#999999;text-decoration:none;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);}.navbar .nav a:hover{color:#ffffff;text-decoration:none;}
.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0;}
.navbar .nav.pull-right{float:right;}
.navbar .nav>li{display:block;float:left;}
.navbar .nav>li>a{float:none;padding:10px 10px 11px;line-height:19px;color:#999999;text-decoration:none;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);}
.navbar .nav>li>a:hover{background-color:transparent;color:#ffffff;text-decoration:none;}
.navbar .nav .active>a{background-color:#222;background-color:rgba(0, 0, 0, 0.5);}
.navbar .nav .vertical-divider{height:40px;width:1px;margin:0 5px;overflow:hidden;background-color:#222;border-right:1px solid #444;}
.navbar .nav.secondary-nav{float:right;margin-left:10px;margin-right:0;}.navbar .nav.secondary-nav .dropdown-menu{right:0;border:0;}
.navbar .vertical-divider{height:40px;width:1px;margin:0 5px;overflow:hidden;background-color:#222;border-right:1px solid #444;}
.navbar .nav.pull-right{margin-left:10px;margin-right:0;}
.navbar .dropdown-menu{top:42px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.navbar .dropdown-menu:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0, 0, 0, 0.1);position:absolute;top:-7px;left:12px;}
.navbar .dropdown-menu:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;top:-6px;left:13px;}
.navbar .dropdown-toggle .caret,.navbar .open.dropdown .caret{border-top-color:#fff;}
.navbar .open .dropdown-toggle{background-color:transparent;}
.navbar .nav.pull-right .dropdown-menu{right:0;}.navbar .nav.pull-right .dropdown-menu:before{left:auto;right:12px;}
.navbar .nav.pull-right .dropdown-menu:after{left:auto;right:13px;}
.nav{margin-left:0;margin-bottom:18px;list-style:none;}
.nav>li>a{display:block;}
.nav>li>a:hover{text-decoration:none;background-color:#eee;}
@ -378,16 +387,6 @@ i{background-image:url(docs/assets/img/glyphicons-halflings-sprite.png);backgrou
.tabbable.tabs-right .tabs .active>a,.tabbable.tabs-right .tabs .active>a:hover{border-color:#ddd;border-left-color:transparent;}
.tab-content>.tab-pane,.pill-content>.pill-pane{display:none;}
.tab-content>.active,.pill-content>.active{display:block;}
.step-nav{position:relative;margin:0 0 18px;list-style:none;line-height:30px;text-align:center;background-color:#f5f5f5;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;}.step-nav li{display:inline;color:#999999;}
.step-nav .prev,.step-nav .next{position:absolute;top:6px;}
.step-nav .prev{left:15px;}
.step-nav .next{right:15px;}
.step-nav .dot{display:inline-block;width:10px;height:10px;margin:0 3px;text-indent:-999em;background-color:#999999;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.25);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.25);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.25);}
.step-nav .dot:hover,.step-nav .active .dot{background-color:#333333;}
.subnav{background-color:#eeeeee;background-image:-khtml-gradient(linear, left top, left bottom, from(#f5f5f5), to(#eeeeee));background-image:-moz-linear-gradient(top, #f5f5f5, #eeeeee);background-image:-ms-linear-gradient(top, #f5f5f5, #eeeeee);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #f5f5f5), color-stop(100%, #eeeeee));background-image:-webkit-linear-gradient(top, #f5f5f5, #eeeeee);background-image:-o-linear-gradient(top, #f5f5f5, #eeeeee);background-image:linear-gradient(top, #f5f5f5, #eeeeee);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#eeeeee', GradientType=0);-webkit-box-shadow:inset 0 1px 0 #ffffff,0 0 5px rgba(0, 0, 0, 0.5);-moz-box-shadow:inset 0 1px 0 #ffffff,0 0 5px rgba(0, 0, 0, 0.5);box-shadow:inset 0 1px 0 #ffffff,0 0 5px rgba(0, 0, 0, 0.5);}.subnav a{padding:8px 10px;font-size:12px;color:#0088cc;text-shadow:0 1px 0 #fff;border-left:1px solid #f9f9f9;border-right:1px solid #e5e5e5;}.subnav a:hover{color:#005580;background-color:#eee;}
.subnav li:first-child a{border-left:0;-webkit-border-radius:6px 0 0 6px;-moz-border-radius:6px 0 0 6px;border-radius:6px 0 0 6px;}
.subnav li:last-child a{border-right:0;-webkit-border-radius:0 6px 6px 0;-moz-border-radius:0 6px 6px 0;border-radius:0 6px 6px 0;}
.subnav ul .active>a{color:#333333;background-color:#eee;}
.breadcrumb{padding:7px 14px;margin:0 0 18px;background-color:#f5f5f5;background-image:-khtml-gradient(linear, left top, left bottom, from(#ffffff), to(#f5f5f5));background-image:-moz-linear-gradient(top, #ffffff, #f5f5f5);background-image:-ms-linear-gradient(top, #ffffff, #f5f5f5);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #f5f5f5));background-image:-webkit-linear-gradient(top, #ffffff, #f5f5f5);background-image:-o-linear-gradient(top, #ffffff, #f5f5f5);background-image:linear-gradient(top, #ffffff, #f5f5f5);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0);border:1px solid #ddd;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;}.breadcrumb li{display:inline;text-shadow:0 1px 0 #ffffff;}
.breadcrumb .divider{padding:0 5px;color:#999999;}
.breadcrumb .active a{color:#333333;}

View File

@ -386,27 +386,30 @@
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">Secondary link</a></li>
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li><a href="#">Another link</a></li>
<li><a href="#">Separated link</a></li>
</ul>
</li>
</ul>
<form class="navbar-search pull-left" action="">
<input type="text" class="search-query span2" placeholder="Search">
</form>
<ul class="nav secondary-nav">
<ul class="nav pull-right">
<li><a href="#">Link</a></li>
<li class="vertical-divider"></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">Secondary link</a></li>
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li><a href="#">Another link</a></li>
<li><a href="#">Separated link</a></li>
</ul>
</li>
</ul>
@ -460,7 +463,8 @@
&lt;li&gt;&lt;a href="#"&gt;Link&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</pre>
<p>Adding dropdowns to the nav is super simple, but does require the use of <a href="./javascript.html/#dropdowns">our javascript plugin</a>.</p>
<h3>Adding dropdowns</h3>
<p>Adding dropdowns to the nav is super simple, but does require the use of <a href="./javascript.html/#dropdown">our javascript plugin</a>.</p>
<pre class="prettyprint linenums">
&lt;ul class="nav"&gt;
&lt;li class="dropdown"&gt;
@ -468,6 +472,7 @@
class="dropdown-toggle"
data-toggle="dropdown">
Account
&lt;b class="caret"&gt;&lt;/b&gt;
&lt;/a&gt;
&lt;ul class="dropdown-menu"&gt;
...
@ -475,6 +480,7 @@
&lt;/li&gt;
&lt;/ul&gt;
</pre>
<p><a class="btn" href="./javascript.html/#dropdown">Get the javascript &rarr;</a></p>
</div>
</div>

View File

@ -323,7 +323,7 @@ $('#myModal').on('hidden', function () {
&lt;ul class="tabs"&gt;
&lt;li class="active"&gt;&lt;a href="#"&gt;Home&lt;/a&gt;&lt;/li&gt;
&lt;li id="secondary" class="dropdown"&gt;
&lt;a href="#secondary" class="dropdown-toggle" data-toggle="dropdown"&gt;Dropdown &lt;span class="caret"&gt;&lt;/span&gt;&lt;/a&gt;
&lt;a href="#secondary" class="dropdown-toggle" data-toggle="dropdown"&gt;Dropdown &lt;b class="caret"&gt;&lt;/b&gt;&lt;/a&gt;
&lt;ul class="dropdown-menu"&gt;
&lt;li&gt;&lt;a href="#"&gt;Secondary link&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#"&gt;Something else here&lt;/a&gt;&lt;/li&gt;
@ -349,23 +349,15 @@ $('#myModal').on('hidden', function () {
<form class="form-search navbar-search pull-left" action="">
<input type="text" class="search-query span2" placeholder="Search">
</form>
<ul class="nav secondary-nav">
<ul class="nav pull-right">
<li id="fat-menu" class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown 1 <span class="caret"></span></a>
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown 1 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">Secondary link</a></li>
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li><a href="#">Another link</a></li>
</ul>
</li>
<li id="mdo-menu" class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown 2 <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">Secondary link</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li><a href="#">Another link</a></li>
<li><a href="#">Separated link</a></li>
</ul>
</li>
</ul>

View File

@ -22,7 +22,8 @@
margin-top: 8px;
margin-left: 2px;
}
.dropdown:hover .caret {
.dropdown:hover .caret,
.open.dropdown .caret {
.opacity(100);
}
// The dropdown menu (ul)

View File

@ -133,54 +133,116 @@
// NAVIGATION
// ----------
// Nav for navbar and topbar
// ul.nav for all topbar based navigation to avoid inheritance issues and over-specificity
.navbar .nav {
position: relative;
left: 0;
display: block;
float: left;
margin: 0 10px 0 0;
> li {
display: block;
float: left;
}
a {
float: none;
padding: 10px 10px 11px;
line-height: 19px;
color: @grayLight;
text-decoration: none;
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
&:hover {
color: @white;
text-decoration: none;
}
}
.active > a {
background-color: #222;
background-color: rgba(0,0,0,.5);
}
// Dividers (basically a vertical hr)
.vertical-divider {
height: 40px;
width: 1px;
margin: 0 5px;
overflow: hidden;
background-color: #222;
border-right: 1px solid #444;
}
}
.navbar .nav.pull-right {
float: right; // redeclare due to specificity
}
.navbar .nav > li {
display: block;
float: left;
}
// Secondary (floated right) nav in topbar
&.secondary-nav {
float: right;
margin-left: 10px;
margin-right: 0;
.dropdown-menu {
right: 0;
border: 0;
}
// Links
.navbar .nav > li > a {
float: none;
padding: 10px 10px 11px;
line-height: 19px;
color: @grayLight;
text-decoration: none;
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
}
// Hover
.navbar .nav > li > a:hover {
background-color: transparent;
color: @white;
text-decoration: none;
}
// Active nav items
.navbar .nav .active > a {
background-color: #222;
background-color: rgba(0,0,0,.5);
}
// Dividers (basically a vertical hr)
.navbar .vertical-divider {
height: 40px;
width: 1px;
margin: 0 5px;
overflow: hidden;
background-color: #222;
border-right: 1px solid #444;
}
// Secondary (floated right) nav in topbar
.navbar .nav.pull-right {
margin-left: 10px;
margin-right: 0;
}
// Dropdown menus
// --------------
// Menu position and menu carets
.navbar .dropdown-menu {
top: 42px;
.border-radius(4px);
&:before {
content: '';
display: inline-block;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-bottom: 7px solid #ccc;
border-bottom-color: rgba(0,0,0,.1);
position: absolute;
top: -7px;
left: 12px;
}
&:after {
content: '';
display: inline-block;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid #fff;
position: absolute;
top: -6px;
left: 13px;
}
}
// Dropdown toggle caret
.navbar .dropdown-toggle .caret,
.navbar .open.dropdown .caret {
border-top-color: #fff;
}
// Remove background color from open dropdown
.navbar .open .dropdown-toggle {
background-color: transparent;
}
// Right aligned menus need alt position
.navbar .nav.pull-right .dropdown-menu {
right: 0;
&:before {
left: auto;
right: 12px;
}
&:after {
left: auto;
right: 13px;
}
}
/* // Dropdowns within the .nav
.dropdown-toggle:hover,
.dropdown.open .dropdown-toggle {
@ -213,4 +275,3 @@
border-color: #444;
}
}*/
}