mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-18 10:52:19 +01:00
enable button groups in vertical button groups
This commit is contained in:
parent
f15f259876
commit
69a3e9b4d0
@ -230,7 +230,7 @@ base_url: "../"
|
|||||||
<h3 id="btn-groups-vertical">Vertical button groups</h3>
|
<h3 id="btn-groups-vertical">Vertical button groups</h3>
|
||||||
<p>Make a set of buttons appear vertically stacked rather than horizontally.</p>
|
<p>Make a set of buttons appear vertically stacked rather than horizontally.</p>
|
||||||
<div class="bs-example">
|
<div class="bs-example">
|
||||||
<div class="btn-group btn-group-vertical">
|
<div class="btn-group-vertical">
|
||||||
<button type="button" class="btn btn-default">Button</button>
|
<button type="button" class="btn btn-default">Button</button>
|
||||||
<button type="button" class="btn btn-default">Button</button>
|
<button type="button" class="btn btn-default">Button</button>
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
@ -265,6 +265,16 @@ base_url: "../"
|
|||||||
<li><a href="#">Dropdown link</a></li>
|
<li><a href="#">Dropdown link</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="btn-group">
|
||||||
|
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||||
|
Dropdown
|
||||||
|
<span class="caret"></span>
|
||||||
|
</button>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
<li><a href="#">Dropdown link</a></li>
|
||||||
|
<li><a href="#">Dropdown link</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% highlight html %}
|
{% highlight html %}
|
||||||
|
34
dist/css/bootstrap.css
vendored
34
dist/css/bootstrap.css
vendored
@ -3559,10 +3559,34 @@ button.close {
|
|||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-group-vertical .btn + .btn,
|
.btn-group-vertical > .btn-group:before,
|
||||||
.btn-group-vertical .btn + .btn-group,
|
.btn-group-vertical > .btn-group:after {
|
||||||
.btn-group-vertical .btn-group + .btn,
|
display: table;
|
||||||
.btn-group-vertical .btn-group + .btn-group {
|
content: " ";
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-group-vertical > .btn-group:after {
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-group-vertical > .btn-group:before,
|
||||||
|
.btn-group-vertical > .btn-group:after {
|
||||||
|
display: table;
|
||||||
|
content: " ";
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-group-vertical > .btn-group:after {
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-group-vertical > .btn-group > .btn {
|
||||||
|
float: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-group-vertical > .btn + .btn,
|
||||||
|
.btn-group-vertical > .btn + .btn-group,
|
||||||
|
.btn-group-vertical > .btn-group + .btn,
|
||||||
|
.btn-group-vertical > .btn-group + .btn-group {
|
||||||
margin-top: -1px;
|
margin-top: -1px;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
@ -3589,14 +3613,12 @@ button.close {
|
|||||||
|
|
||||||
.btn-group-vertical > .btn-group:first-child > .btn:last-child,
|
.btn-group-vertical > .btn-group:first-child > .btn:last-child,
|
||||||
.btn-group-vertical > .btn-group:first-child > .dropdown-toggle {
|
.btn-group-vertical > .btn-group:first-child > .dropdown-toggle {
|
||||||
border-top-right-radius: 4px;
|
|
||||||
border-bottom-right-radius: 0;
|
border-bottom-right-radius: 0;
|
||||||
border-bottom-left-radius: 0;
|
border-bottom-left-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-group-vertical > .btn-group:last-child > .btn:first-child {
|
.btn-group-vertical > .btn-group:last-child > .btn:first-child {
|
||||||
border-top-right-radius: 0;
|
border-top-right-radius: 0;
|
||||||
border-bottom-left-radius: 4px;
|
|
||||||
border-top-left-radius: 0;
|
border-top-left-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
dist/css/bootstrap.min.css
vendored
2
dist/css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
@ -168,18 +168,27 @@
|
|||||||
// Vertical button groups
|
// Vertical button groups
|
||||||
// ----------------------
|
// ----------------------
|
||||||
|
|
||||||
.btn-group-vertical > .btn,
|
|
||||||
.btn-group-vertical > .btn-group {
|
|
||||||
display: block;
|
|
||||||
float: none;
|
|
||||||
width: 100%;
|
|
||||||
max-width: 100%;
|
|
||||||
}
|
|
||||||
.btn-group-vertical {
|
.btn-group-vertical {
|
||||||
.btn + .btn,
|
> .btn,
|
||||||
.btn + .btn-group,
|
> .btn-group {
|
||||||
.btn-group + .btn,
|
display: block;
|
||||||
.btn-group + .btn-group {
|
float: none;
|
||||||
|
width: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clear floats so dropdown menus can be properly placed
|
||||||
|
> .btn-group {
|
||||||
|
.clearfix();
|
||||||
|
> .btn {
|
||||||
|
float: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> .btn + .btn,
|
||||||
|
> .btn + .btn-group,
|
||||||
|
> .btn-group + .btn,
|
||||||
|
> .btn-group + .btn-group {
|
||||||
margin-top: -1px;
|
margin-top: -1px;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
@ -204,12 +213,10 @@
|
|||||||
.btn-group-vertical > .btn-group:first-child {
|
.btn-group-vertical > .btn-group:first-child {
|
||||||
> .btn:last-child,
|
> .btn:last-child,
|
||||||
> .dropdown-toggle {
|
> .dropdown-toggle {
|
||||||
border-top-right-radius: @border-radius-base;
|
|
||||||
.border-bottom-radius(0);
|
.border-bottom-radius(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.btn-group-vertical > .btn-group:last-child > .btn:first-child {
|
.btn-group-vertical > .btn-group:last-child > .btn:first-child {
|
||||||
border-bottom-left-radius: @border-radius-base;
|
|
||||||
.border-top-radius(0);
|
.border-top-radius(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user