mirror of https://github.com/twbs/bootstrap.git
#2764: add disabled styles to navs and dropdowns
This commit is contained in:
parent
d14f06fc4e
commit
64ba423b6d
|
@ -2466,6 +2466,17 @@ table .span24 {
|
||||||
outline: 0;
|
outline: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dropdown-menu .disabled > a,
|
||||||
|
.dropdown-menu .disabled > a:hover {
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-menu .disabled > a:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
cursor: default;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
.open {
|
.open {
|
||||||
*z-index: 1000;
|
*z-index: 1000;
|
||||||
}
|
}
|
||||||
|
@ -3580,6 +3591,16 @@ input[type="submit"].btn.btn-mini {
|
||||||
*border-left-color: #ffffff;
|
*border-left-color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nav > .disabled > a {
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav > .disabled > a:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
cursor: default;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
.navbar {
|
.navbar {
|
||||||
*position: relative;
|
*position: relative;
|
||||||
*z-index: 2;
|
*z-index: 2;
|
||||||
|
|
|
@ -114,7 +114,7 @@
|
||||||
|
|
||||||
<!-- Dropdowns
|
<!-- Dropdowns
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<section id="Dropdowns">
|
<section id="dropdowns">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1>Dropdown menus <small>Dropdown and dropup menus for contextual actions</small></h1>
|
<h1>Dropdown menus <small>Dropdown and dropup menus for contextual actions</small></h1>
|
||||||
</div>
|
</div>
|
||||||
|
@ -653,6 +653,23 @@
|
||||||
<li><a href="#">...</a></li>
|
<li><a href="#">...</a></li>
|
||||||
<li><a href="#">...</a></li>
|
<li><a href="#">...</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<h3>Disabled state</h3>
|
||||||
|
<p>For any nav component (tabs, pills, or list), add <code>.disabled</code> for <strong>gray links and no hover effects</strong>. Links will remain clickable, however, unless custom javascript is implemented to prevent those clicks.</p>
|
||||||
|
<div class="bs-docs-example">
|
||||||
|
<ul class="nav nav-pills">
|
||||||
|
<li><a href="#">Clickable link</a></li>
|
||||||
|
<li><a href="#">Clickable link</a></li>
|
||||||
|
<li class="disabled"><a href="#">Disabled link</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<pre class="prettyprint linenums">
|
||||||
|
<ul class="nav nav-pills">
|
||||||
|
...
|
||||||
|
<li class="disabled"><a href="#">Home</a></li>
|
||||||
|
...
|
||||||
|
</ul>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h3>Component alignment</h3>
|
<h3>Component alignment</h3>
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
<!-- Dropdowns
|
<!-- Dropdowns
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<section id="Dropdowns">
|
<section id="dropdowns">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1>{{_i}}Dropdown menus{{/i}} <small>{{_i}}Dropdown and dropup menus for contextual actions{{/i}}</small></h1>
|
<h1>{{_i}}Dropdown menus{{/i}} <small>{{_i}}Dropdown and dropup menus for contextual actions{{/i}}</small></h1>
|
||||||
</div>
|
</div>
|
||||||
|
@ -576,6 +576,23 @@
|
||||||
<li><a href="#">...</a></li>
|
<li><a href="#">...</a></li>
|
||||||
<li><a href="#">...</a></li>
|
<li><a href="#">...</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<h3>{{_i}}Disabled state{{/i}}</h3>
|
||||||
|
<p>{{_i}}For any nav component (tabs, pills, or list), add <code>.disabled</code> for <strong>gray links and no hover effects</strong>. Links will remain clickable, however, unless custom javascript is implemented to prevent those clicks.{{/i}}</p>
|
||||||
|
<div class="bs-docs-example">
|
||||||
|
<ul class="nav nav-pills">
|
||||||
|
<li><a href="#">{{_i}}Clickable link{{/i}}</a></li>
|
||||||
|
<li><a href="#">{{_i}}Clickable link{{/i}}</a></li>
|
||||||
|
<li class="disabled"><a href="#">{{_i}}Disabled link{{/i}}</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<pre class="prettyprint linenums">
|
||||||
|
<ul class="nav nav-pills">
|
||||||
|
...
|
||||||
|
<li class="disabled"><a href="#">{{_i}}Home{{/i}}</a></li>
|
||||||
|
...
|
||||||
|
</ul>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h3>{{_i}}Component alignment{{/i}}</h3>
|
<h3>{{_i}}Component alignment{{/i}}</h3>
|
||||||
|
|
|
@ -103,6 +103,20 @@
|
||||||
outline: 0;
|
outline: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Disabled state
|
||||||
|
// --------------
|
||||||
|
// Gray out text and ensure the hover state remains gray
|
||||||
|
.dropdown-menu .disabled > a,
|
||||||
|
.dropdown-menu .disabled > a:hover {
|
||||||
|
color: @grayLight;
|
||||||
|
}
|
||||||
|
// Nuke hover effects
|
||||||
|
.dropdown-menu .disabled > a:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
background-color: transparent;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
// Open state for the dropdown
|
// Open state for the dropdown
|
||||||
// ---------------------------
|
// ---------------------------
|
||||||
.open {
|
.open {
|
||||||
|
|
|
@ -361,3 +361,19 @@
|
||||||
border-color: #ddd #ddd #ddd transparent;
|
border-color: #ddd #ddd #ddd transparent;
|
||||||
*border-left-color: @white;
|
*border-left-color: @white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// DISABLED STATES
|
||||||
|
// ---------------
|
||||||
|
|
||||||
|
// Gray out text
|
||||||
|
.nav > .disabled > a {
|
||||||
|
color: @grayLight;
|
||||||
|
}
|
||||||
|
// Nuke hover effects
|
||||||
|
.nav > .disabled > a:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
background-color: transparent;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue