mirror of
https://github.com/twbs/bootstrap.git
synced 2025-03-15 15:29:22 +01:00
fixes #18053 by removing container padding at lower breakpoints on responsive navbars
This commit is contained in:
parent
0677b6b18c
commit
ecba56828d
@ -367,14 +367,16 @@ Although it's not required, you can wrap a navbar in a `.container` to center it
|
||||
|
||||
{% example html %}
|
||||
<div class="container">
|
||||
<nav class="navbar navbar-light bg-faded">
|
||||
<nav class="navbar navbar-light bg-faded navbar-toggleable-md">
|
||||
<a class="navbar-brand" href="#">Navbar</a>
|
||||
</nav>
|
||||
</div>
|
||||
{% endexample %}
|
||||
|
||||
When the container is within your navbar, it's horizontal padding is removed at breakpoints lower than your specified `.navbar-toggleable-*` class. This ensures we're not doubling up on padding unnecessarily on lower viewports when your navbar is collapsed.
|
||||
|
||||
{% example html %}
|
||||
<nav class="navbar navbar-light bg-faded">
|
||||
<nav class="navbar navbar-light bg-faded navbar-toggleable-md">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="#">Navbar</a>
|
||||
</div>
|
||||
|
@ -242,6 +242,11 @@
|
||||
float: none;
|
||||
}
|
||||
}
|
||||
|
||||
> .container {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@include media-breakpoint-up($next) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user