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
7d41a387
Commit
7d41a387
authored
May 03, 2013
by
Mark Otto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #7511: add support for nested button groups so you can use dropdowns in your button groups
parent
ee0789ff
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
0 deletions
+56
-0
docs/assets/css/bootstrap.css
docs/assets/css/bootstrap.css
+19
-0
docs/docs.html
docs/docs.html
+22
-0
less/button-groups.less
less/button-groups.less
+15
-0
No files found.
docs/assets/css/bootstrap.css
View file @
7d41a387
...
@@ -3889,6 +3889,25 @@ button.close {
...
@@ -3889,6 +3889,25 @@ button.close {
border-bottom-right-radius
:
6px
;
border-bottom-right-radius
:
6px
;
}
}
.btn-group
>
.btn-group
{
float
:
left
;
}
.btn-group
>
.btn-group
>
.btn
{
border-radius
:
0
;
}
.btn-group
>
.btn-group
:last-child
>
.btn
{
border-top-right-radius
:
4px
;
border-bottom-right-radius
:
4px
;
}
.btn-group
>
.btn-group
:first-child
>
.btn
{
margin-left
:
0
;
border-bottom-left-radius
:
4px
;
border-top-left-radius
:
4px
;
}
.btn-group
.dropdown-toggle
:active
,
.btn-group
.dropdown-toggle
:active
,
.btn-group.open
.dropdown-toggle
{
.btn-group.open
.dropdown-toggle
{
outline
:
0
;
outline
:
0
;
...
...
docs/docs.html
View file @
7d41a387
...
@@ -2919,6 +2919,28 @@ For example, <code><section></code> should be wrapped as inline.
...
@@ -2919,6 +2919,28 @@ For example, <code><section></code> should be wrapped as inline.
</div>
</div>
{% endhighlight %}
{% endhighlight %}
<h3
id=
"btn-groups-nested"
>
Nested button groups
</h3>
<p>
Place buttons groups within button groups when you want dropdown menus mixed with a series of buttons.
</p>
<div
class=
"bs-docs-example"
>
<div
class=
"btn-group"
>
<button
type=
"button"
class=
"btn"
>
1
</button>
<button
type=
"button"
class=
"btn"
>
2
</button>
<button
type=
"button"
class=
"btn"
>
3
</button>
<div
class=
"btn-group"
>
<button
type=
"button"
class=
"btn 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>
<li><a
href=
"#"
>
Dropdown link
</a></li>
</ul>
</div>
</div>
</div>
<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-docs-example"
>
<div
class=
"bs-docs-example"
>
...
...
less/button-groups.less
View file @
7d41a387
...
@@ -73,6 +73,21 @@
...
@@ -73,6 +73,21 @@
.border-right-radius(@border-radius-large);
.border-right-radius(@border-radius-large);
}
}
// Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)
.btn-group > .btn-group {
float: left;
}
.btn-group > .btn-group > .btn {
border-radius: 0;
}
.btn-group > .btn-group:last-child > .btn {
.border-right-radius(@border-radius-base);
}
.btn-group > .btn-group:first-child > .btn {
margin-left: 0;
.border-left-radius(@border-radius-base);
}
// On active and open, don't show outline
// On active and open, don't show outline
.btn-group .dropdown-toggle:active,
.btn-group .dropdown-toggle:active,
.btn-group.open .dropdown-toggle {
.btn-group.open .dropdown-toggle {
...
...
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