Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bootstrap
Commits
f15f2598
Commit
f15f2598
authored
Aug 13, 2013
by
Mark Otto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
derp
parent
36c4223b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
96 additions
and
15 deletions
+96
-15
components.html
components.html
+31
-1
dist/css/bootstrap.css
dist/css/bootstrap.css
+29
-5
dist/css/bootstrap.min.css
dist/css/bootstrap.min.css
+1
-1
less/button-groups.less
less/button-groups.less
+35
-8
No files found.
components.html
View file @
f15f2598
...
@@ -230,11 +230,41 @@ base_url: "../"
...
@@ -230,11 +230,41 @@ 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-vertical"
>
<div
class=
"btn-group
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"
>
<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>
<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"
>
<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
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 %}
...
...
dist/css/bootstrap.css
View file @
f15f2598
...
@@ -3551,28 +3551,52 @@ button.close {
...
@@ -3551,28 +3551,52 @@ button.close {
border-bottom-width
:
5px
;
border-bottom-width
:
5px
;
}
}
.btn-group-vertical
>
.btn
{
.btn-group-vertical
>
.btn
,
.btn-group-vertical
>
.btn-group
{
display
:
block
;
display
:
block
;
float
:
none
;
float
:
none
;
width
:
100%
;
width
:
100%
;
max-width
:
100%
;
max-width
:
100%
;
}
}
.btn-group-vertical
>
.btn
+
.btn
{
.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
;
}
}
.btn-group-vertical
.btn
:not
(
:first-child
)
:not
(
:last-child
)
{
.btn-group-vertical
>
.btn
:not
(
:first-child
)
:not
(
:last-child
)
{
border-radius
:
0
;
border-radius
:
0
;
}
}
.btn-group-vertical
.btn
:first-child:not
(
:last-child
)
{
.btn-group-vertical
>
.btn
:first-child:not
(
:last-child
)
{
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
:last-child:not
(
:first-child
)
{
.btn-group-vertical
>
.btn
:last-child:not
(
:first-child
)
{
border-top-right-radius
:
0
;
border-top-right-radius
:
0
;
border-bottom-left-radius
:
4px
;
border-top-left-radius
:
0
;
}
.btn-group-vertical
>
.btn-group
:not
(
:first-child
)
:not
(
:last-child
)
>
.btn
{
border-radius
:
0
;
}
.btn-group-vertical
>
.btn-group
:first-child
>
.btn
:last-child
,
.btn-group-vertical
>
.btn-group
:first-child
>
.dropdown-toggle
{
border-top-right-radius
:
4px
;
border-bottom-right-radius
:
0
;
border-bottom-left-radius
:
0
;
}
.btn-group-vertical
>
.btn-group
:last-child
>
.btn
:first-child
{
border-top-right-radius
:
0
;
border-bottom-left-radius
:
4px
;
border-top-left-radius
:
0
;
border-top-left-radius
:
0
;
}
}
...
...
dist/css/bootstrap.min.css
View file @
f15f2598
This source diff could not be displayed because it is too large. You can
view the blob
instead.
less/button-groups.less
View file @
f15f2598
...
@@ -55,11 +55,13 @@
...
@@ -55,11 +55,13 @@
}
}
// Prevent double borders when buttons are next to each other
// Prevent double borders when buttons are next to each other
.btn-group .btn + .btn,
.btn-group {
.btn-group .btn + .btn-group,
.btn + .btn,
.btn-group .btn-group + .btn,
.btn + .btn-group,
.btn-group .btn-group + .btn-group {
.btn-group + .btn,
.btn-group + .btn-group {
margin-left: -1px;
margin-left: -1px;
}
}
}
// Optional: Group multiple button groups together for a toolbar
// Optional: Group multiple button groups together for a toolbar
...
@@ -166,26 +168,51 @@
...
@@ -166,26 +168,51 @@
// Vertical button groups
// Vertical button groups
// ----------------------
// ----------------------
.btn-group-vertical > .btn {
.btn-group-vertical > .btn,
.btn-group-vertical > .btn-group {
display: block;
display: block;
float: none;
float: none;
width: 100%;
width: 100%;
max-width: 100%;
max-width: 100%;
+ .btn {
}
.btn-group-vertical {
.btn + .btn,
.btn + .btn-group,
.btn-group + .btn,
.btn-group + .btn-group {
margin-top: -1px;
margin-top: -1px;
margin-left: 0;
}
}
}
}
.btn-group-vertical .btn {
.btn-group-vertical > .btn {
&:not(:first-child):not(:last-child) {
&:not(:first-child):not(:last-child) {
border-radius: 0;
border-radius: 0;
}
}
&:first-child:not(:last-child) {
&:first-child:not(:last-child) {
border-top-right-radius: @border-radius-base;
.border-bottom-radius(0);
.border-bottom-radius(0);
}
}
&:last-child:not(:first-child) {
&:last-child:not(:first-child) {
border-bottom-left-radius: @border-radius-base;
.border-top-radius(0);
.border-top-radius(0);
}
}
}
}
.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
border-radius: 0;
}
.btn-group-vertical > .btn-group:first-child {
> .btn:last-child,
> .dropdown-toggle {
border-top-right-radius: @border-radius-base;
.border-bottom-radius(0);
}
}
.btn-group-vertical > .btn-group:last-child > .btn:first-child {
border-bottom-left-radius: @border-radius-base;
.border-top-radius(0);
}
// Justified button groups
// Justified button groups
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment