mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-30 22:52:24 +01:00
collapsing navbar tools
This commit is contained in:
parent
11f37681ef
commit
605990400e
@ -3201,7 +3201,6 @@ input[type="submit"].btn-block, input[type="reset"].btn-block, input[type="butto
|
|||||||
}
|
}
|
||||||
|
|
||||||
.navbar-toggler {
|
.navbar-toggler {
|
||||||
float: left;
|
|
||||||
padding: .55rem .75rem;
|
padding: .55rem .75rem;
|
||||||
margin-right: 1rem;
|
margin-right: 1rem;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
@ -3214,6 +3213,17 @@ input[type="submit"].btn-block, input[type="reset"].btn-block, input[type="butto
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (min-width: 34em) {
|
||||||
|
.navbar-toggleable-xs {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (min-width: 48em) {
|
||||||
|
.navbar-toggleable-sm {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.navbar-form {
|
.navbar-form {
|
||||||
padding: 10px 1rem;
|
padding: 10px 1rem;
|
||||||
margin-right: -1rem;
|
margin-right: -1rem;
|
||||||
|
2
dist/css/bootstrap.css.map
vendored
2
dist/css/bootstrap.css.map
vendored
File diff suppressed because one or more lines are too long
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
@ -12,7 +12,7 @@
|
|||||||
<ul class="dropdown-menu bs-docs-search-results" id="search-results"></ul>
|
<ul class="dropdown-menu bs-docs-search-results" id="search-results"></ul>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<nav class="bs-docs-links collapse hidden-xs-down" id="docsNavbarContent">
|
<nav class="bs-docs-links collapse navbar-toggleable-xs" id="docsNavbarContent">
|
||||||
{% for group in site.data.nav %}
|
{% for group in site.data.nav %}
|
||||||
{% assign link = group.pages | first %}
|
{% assign link = group.pages | first %}
|
||||||
{% assign slug = group.title | downcase | replace: ' ', '-' || page.title | downcase | replace: ' ', '-' %}
|
{% assign slug = group.title | downcase | replace: ' ', '-' || page.title | downcase | replace: ' ', '-' %}
|
||||||
|
2
docs/assets/css/docs.min.css
vendored
2
docs/assets/css/docs.min.css
vendored
File diff suppressed because one or more lines are too long
@ -1012,7 +1012,7 @@ body {
|
|||||||
@include media-breakpoint-up(sm) {
|
@include media-breakpoint-up(sm) {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
margin-bottom: -1rem;
|
margin-bottom: 0;
|
||||||
padding: 1.5rem;
|
padding: 1.5rem;
|
||||||
border-width: .2rem;
|
border-width: .2rem;
|
||||||
}
|
}
|
||||||
@ -1276,7 +1276,7 @@ body {
|
|||||||
|
|
||||||
.highlight {
|
.highlight {
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
margin: 1rem -1rem;
|
margin: 0 -1rem 1rem;
|
||||||
background-color: #f7f7f9;
|
background-color: #f7f7f9;
|
||||||
|
|
||||||
@include media-breakpoint-up(sm) {
|
@include media-breakpoint-up(sm) {
|
||||||
|
@ -155,15 +155,31 @@ Replace `.navbar-default` with `.navbar-inverse` for a darker background color a
|
|||||||
Our collapse plugin allows you to use a `<button>` or `<a>` to toggle hidden content.
|
Our collapse plugin allows you to use a `<button>` or `<a>` to toggle hidden content.
|
||||||
|
|
||||||
{% example html %}
|
{% example html %}
|
||||||
<div class="collapse" id="navbar-header">
|
<div class="collapse" id="exCollapsingNavbar">
|
||||||
<div class="inverse p-a">
|
<div class="inverse p-a">
|
||||||
<h3>Collapsed content</h3>
|
<h4>Collapsed content</h4>
|
||||||
<p>Toggleable via the navbar brand.</p>
|
<p>Toggleable via the navbar brand.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<nav class="navbar navbar-default">
|
<nav class="navbar navbar-default">
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar-header">
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#exCollapsingNavbar">
|
||||||
☰
|
☰
|
||||||
</button>
|
</button>
|
||||||
</nav>
|
</nav>
|
||||||
{% endexample %}
|
{% endexample %}
|
||||||
|
|
||||||
|
For more complex navbar patterns, like those used in Bootstrap v3, use the `.navbar-toggleable-*` classes in conjunction with the `.navbar-toggler`. These classes override our responsive utilities to show navigation only when content is meant to be shown.
|
||||||
|
|
||||||
|
{% example html %}
|
||||||
|
<nav class="navbar navbar-default">
|
||||||
|
<button class="navbar-toggler hidden-sm-up" type="button" data-toggle="collapse" data-target="#exCollapsingNavbar2">
|
||||||
|
☰
|
||||||
|
</button>
|
||||||
|
<div class="collapse navbar-toggleable-xs" id="exCollapsingNavbar2">
|
||||||
|
<h4>Collapsed on xs devices</h4>
|
||||||
|
<p>Toggleable via the navbar brand.</p>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
{% endexample %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3201,7 +3201,6 @@ input[type="submit"].btn-block, input[type="reset"].btn-block, input[type="butto
|
|||||||
}
|
}
|
||||||
|
|
||||||
.navbar-toggler {
|
.navbar-toggler {
|
||||||
float: left;
|
|
||||||
padding: .55rem .75rem;
|
padding: .55rem .75rem;
|
||||||
margin-right: 1rem;
|
margin-right: 1rem;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
@ -3214,6 +3213,17 @@ input[type="submit"].btn-block, input[type="reset"].btn-block, input[type="butto
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (min-width: 34em) {
|
||||||
|
.navbar-toggleable-xs {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (min-width: 48em) {
|
||||||
|
.navbar-toggleable-sm {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.navbar-form {
|
.navbar-form {
|
||||||
padding: 10px 1rem;
|
padding: 10px 1rem;
|
||||||
margin-right: -1rem;
|
margin-right: -1rem;
|
||||||
|
2
docs/dist/css/bootstrap.css.map
vendored
2
docs/dist/css/bootstrap.css.map
vendored
File diff suppressed because one or more lines are too long
2
docs/dist/css/bootstrap.min.css
vendored
2
docs/dist/css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
@ -99,7 +99,6 @@
|
|||||||
// JavaScript plugin.
|
// JavaScript plugin.
|
||||||
|
|
||||||
.navbar-toggler {
|
.navbar-toggler {
|
||||||
float: left;
|
|
||||||
padding: .55rem .75rem;
|
padding: .55rem .75rem;
|
||||||
margin-right: $spacer;
|
margin-right: $spacer;
|
||||||
margin-bottom: 0; // For headings
|
margin-bottom: 0; // For headings
|
||||||
@ -113,6 +112,20 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Custom override for
|
||||||
|
.navbar-toggleable {
|
||||||
|
&-xs {
|
||||||
|
@include media-breakpoint-up(sm) {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&-sm {
|
||||||
|
@include media-breakpoint-up(md) {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Navbar form
|
// Navbar form
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user