<header class="navbar navbar-light navbar-static-top bd-navbar">
<div class="container">
{% comment %}
- <nav class="nav navbar-nav float-xs-right">
+ <nav class="nav navbar-nav float-right">
<div class="nav-item dropdown">
<a class="nav-item nav-link dropdown-toggle" href="#" id="bd-versions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
v{{ site.current_version }}
<nav>
<div class="clearfix">
- <button class="navbar-toggler float-xs-right hidden-sm-up" type="button" data-toggle="collapse" data-target="#bd-main-nav" aria-controls="bd-main-nav" aria-expanded="false" aria-label="Toggle navigation"></button>
+ <button class="navbar-toggler float-right hidden-sm-up" type="button" data-toggle="collapse" data-target="#bd-main-nav" aria-controls="bd-main-nav" aria-expanded="false" aria-label="Toggle navigation"></button>
<a class="navbar-brand hidden-sm-up" href="{{ site.baseurl }}/">
Bootstrap
</a>
</div>
- <div class="collapse navbar-toggleable-xs" id="bd-main-nav">
+ <div class="collapse navbar-toggleable" id="bd-main-nav">
<ul class="nav navbar-nav">
<li class="nav-item active">
<a class="nav-item nav-link {% if page.layout == "home" %}active{% endif %}" href="{{ site.baseurl }}/" onclick="ga('send', 'event', 'Navbar', 'Community links', 'Bootstrap');">Bootstrap</a>
<footer class="text-muted">
<div class="container">
- <p class="float-xs-right">
+ <p class="float-right">
<a href="#">Back to top</a>
</p>
<p>Album example is © Bootstrap, but please download and customize it for yourself!</p>
<!-- FOOTER -->
<footer>
- <p class="float-xs-right"><a href="#">Back to top</a></p>
+ <p class="float-right"><a href="#">Back to top</a></p>
<p>© 2014 Company, Inc. · <a href="#">Privacy</a> · <a href="#">Terms</a></p>
</footer>
<div class="container">
<div class="header clearfix">
<nav>
- <ul class="nav nav-pills float-xs-right">
+ <ul class="nav nav-pills float-right">
<li class="nav-item">
<a class="nav-link active" href="#">Home <span class="sr-only">(current)</span></a>
</li>
<div class="container">
<nav class="navbar navbar-light bg-faded">
<button class="navbar-toggler hidden-sm-up" type="button" data-toggle="collapse" data-target="#navbar-header" aria-controls="navbar-header" aria-expanded="false" aria-label="Toggle navigation"></button>
- <div class="collapse navbar-toggleable-xs" id="navbar-header">
+ <div class="collapse navbar-toggleable" id="navbar-header">
<a class="navbar-brand" href="#">Navbar</a>
<ul class="nav navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="#">About</a>
</li>
</ul>
- <form class="form-inline float-xs-right">
+ <form class="form-inline float-right">
<input class="form-control" type="text" placeholder="Search">
<button class="btn btn-outline-success" type="submit">Search</button>
</form>
<div class="row row-offcanvas row-offcanvas-right">
<div class="col-12 col-sm-9">
- <p class="float-xs-right hidden-sm-up">
+ <p class="float-right hidden-sm-up">
<button type="button" class="btn btn-primary btn-sm" data-toggle="offcanvas">Toggle nav</button>
</p>
<div class="jumbotron">
<nav class="navbar navbar-light navbar-static-top bg-faded">
<div class="container">
<button class="navbar-toggler hidden-sm-up" type="button" data-toggle="collapse" data-target="#exCollapsingNavbar2" aria-expanded="false" aria-controls="exCollapsingNavbar2" aria-label="Toggle navigation"></button>
- <div class="collapse navbar-toggleable-xs" id="exCollapsingNavbar2">
+ <div class="collapse navbar-toggleable" id="exCollapsingNavbar2">
<a class="navbar-brand" href="#">Sticky footer</a>
<ul class="nav navbar-nav">
<li class="nav-item active">
<body>
- <button class="btn btn-secondary float-xs-right tooltip-bottom" title="This should be shifted to the left">Shift Left</button>
+ <button class="btn btn-secondary float-right tooltip-bottom" title="This should be shifted to the left">Shift Left</button>
<button class="btn btn-secondary tooltip-bottom" title="This should be shifted to the right">Shift Right</button>
<button class="btn btn-secondary tooltip-right" title="This should be shifted down">Shift Down</button>
<button class="btn btn-secondary tooltip-viewport-bottom" title="This should be shifted to the left">Shift Left</button>
<button class="btn btn-secondary tooltip-viewport-right" title="This should be shifted down">Shift Down</button>
- <button class="btn btn-secondary float-xs-right tooltip-viewport-bottom" title="This should be shifted to the right">Shift Right</button>
+ <button class="btn btn-secondary float-right tooltip-viewport-bottom" title="This should be shifted to the right">Shift Right</button>
<button class="btn btn-secondary tooltip-viewport-right btn-bottom" title="This should be shifted up">Shift Up</button>
</div>
}
}
-// scss-lint:disable ImportantRule
-.navbar-toggleable {
- @each $breakpoint in map-keys($grid-breakpoints) {
- $next: breakpoint-next($breakpoint, $grid-breakpoints);
-
- &-#{$breakpoint} {
- @include clearfix;
-
- @include media-breakpoint-down($breakpoint) {
- .navbar-brand {
- display: block;
- float: none;
- margin-top: .5rem;
- margin-right: 0;
- }
-
- .navbar-nav {
- margin-top: .5rem;
- margin-bottom: .5rem;
-
- .dropdown-menu {
- position: static;
- float: none;
- }
- }
- }
-
- @include media-breakpoint-up($next) {
- display: block;
- }
- }
- }
-}
-// scss-lint:enable ImportantRule
-
-
// Navigation
//
// Custom navbar navigation built on the base `.nav` styles.
}
}
-
// Navbar toggleable
//
// Custom override for collapse plugin in navbar.
+// Placed at the end of the file so it can override some CSS properties
+// scss-lint:disable ImportantRule
.navbar-toggleable {
- &-xs {
- @include clearfix;
- @include media-breakpoint-down(xs) {
- .navbar-nav .nav-item {
- float: none;
- margin-left: 0;
- }
- }
- @include media-breakpoint-up(sm) {
- display: block !important;
- }
- }
+ @each $breakpoint in map-keys($grid-breakpoints) {
+ $next: breakpoint-next($breakpoint, $grid-breakpoints);
+
+ // Get rid of the 'xs' prefix while reducing duplication
+ #{if(breakpoint-min($breakpoint, $grid-breakpoints), "&-#{$breakpoint}", "&")} {
+ @include clearfix;
- &-sm {
- @include clearfix;
- @include media-breakpoint-down(sm) {
- .navbar-nav .nav-item {
- float: none;
- margin-left: 0;
+ @include media-breakpoint-down($breakpoint) {
+ .navbar-brand {
+ display: block;
+ float: none;
+ margin-top: .5rem;
+ margin-right: 0;
+ }
+
+ .navbar-nav {
+ margin-top: .5rem;
+ margin-bottom: .5rem;
+
+ .dropdown-menu {
+ position: static;
+ float: none;
+ }
+
+ .nav-item {
+ float: none;
+ margin-left: 0;
+ }
+ }
}
- }
- @include media-breakpoint-up(md) {
- display: block !important;
- }
- }
- &-md {
- @include clearfix;
- @include media-breakpoint-down(md) {
- .navbar-nav .nav-item {
- float: none;
- margin-left: 0;
+ @include media-breakpoint-up($next) {
+ display: block !important;
}
}
- @include media-breakpoint-up(lg) {
- display: block !important;
- }
}
}
+// scss-lint:enable ImportantRule
-.align-baseline { vertical-align: baseline !important; } // Browser default
-.align-top { vertical-align: top !important; }
-.align-middle { vertical-align: middle !important; }
-.align-bottom { vertical-align: bottom !important; }
+.align-baseline { vertical-align: baseline !important; } // Browser default
+.align-top { vertical-align: top !important; }
+.align-middle { vertical-align: middle !important; }
+.align-bottom { vertical-align: bottom !important; }
.align-text-bottom { vertical-align: text-bottom !important; }
-.align-text-top { vertical-align: text-top !important; }
+.align-text-top { vertical-align: text-top !important; }
// Border
//
-.border-0 { border: 0 !important; }
-.border-top-0 { border-top: 0 !important; }
-.border-right-0 { border-right: 0 !important; }
+.border-0 { border: 0 !important; }
+.border-top-0 { border-top: 0 !important; }
+.border-right-0 { border-right: 0 !important; }
.border-bottom-0 { border-bottom: 0 !important; }
-.border-left-0 { border-left: 0 !important; }
+.border-left-0 { border-left: 0 !important; }
//
// Border-radius
$min: breakpoint-min($breakpoint, $grid-breakpoints);
@if $min {
- .d-#{$breakpoint}-none { display: none !important; }
- .d-#{$breakpoint}-inline { display: inline !important; }
+ .d-#{$breakpoint}-none { display: none !important; }
+ .d-#{$breakpoint}-inline { display: inline !important; }
.d-#{$breakpoint}-inline-block { display: inline-block !important; }
- .d-#{$breakpoint}-block { display: block !important; }
- .d-#{$breakpoint}-table { display: table !important; }
- .d-#{$breakpoint}-table-cell { display: table-cell !important; }
- .d-#{$breakpoint}-flex { display: flex !important; }
+ .d-#{$breakpoint}-block { display: block !important; }
+ .d-#{$breakpoint}-table { display: table !important; }
+ .d-#{$breakpoint}-table-cell { display: table-cell !important; }
+ .d-#{$breakpoint}-flex { display: flex !important; }
} @else {
- .d-none { display: none !important; }
- .d-inline { display: inline !important; }
+ .d-none { display: none !important; }
+ .d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
- .d-block { display: block !important; }
- .d-table { display: table !important; }
- .d-table-cell { display: table-cell !important; }
- .d-flex { display: flex !important; }
+ .d-block { display: block !important; }
+ .d-table { display: table !important; }
+ .d-table-cell { display: table-cell !important; }
+ .d-flex { display: flex !important; }
}
}
}
@if $min {
// everything else
- .float-#{$breakpoint}-left { @include float-left; }
+ .float-#{$breakpoint}-left { @include float-left; }
.float-#{$breakpoint}-right { @include float-right; }
- .float-#{$breakpoint}-none { @include float-none; }
+ .float-#{$breakpoint}-none { @include float-none; }
} @else {
// xs
- .float-left { @include float-left; }
+ .float-left { @include float-left; }
.float-right { @include float-right; }
- .float-none { @include float-none; }
+ .float-none { @include float-none; }
}
}
}
@if $min {
// everything else
- .#{$abbrev}-#{$breakpoint}-#{$size} { #{$prop}: $length-y $length-x !important; } // a = All sides
+ .#{$abbrev}-#{$breakpoint}-#{$size} { #{$prop}: $length-y $length-x !important; }
.#{$abbrev}t-#{$breakpoint}-#{$size} { #{$prop}-top: $length-y !important; }
.#{$abbrev}r-#{$breakpoint}-#{$size} { #{$prop}-right: $length-x !important; }
.#{$abbrev}b-#{$breakpoint}-#{$size} { #{$prop}-bottom: $length-y !important; }
}
} @else {
// xs
- .#{$abbrev}-#{$size} { #{$prop}: $length-y $length-x !important; } // a = All sides
+ .#{$abbrev}-#{$size} { #{$prop}: $length-y $length-x !important; }
.#{$abbrev}t-#{$size} { #{$prop}-top: $length-y !important; }
.#{$abbrev}r-#{$size} { #{$prop}-right: $length-x !important; }
.#{$abbrev}b-#{$size} { #{$prop}-bottom: $length-y !important; }
// Alignment
-.text-justify { text-align: justify !important; }
-.text-nowrap { white-space: nowrap !important; }
-.text-truncate { @include text-truncate; }
+.text-justify { text-align: justify !important; }
+.text-nowrap { white-space: nowrap !important; }
+.text-truncate { @include text-truncate; }
// Responsive alignment
// Transformation
-.text-lowercase { text-transform: lowercase !important; }
-.text-uppercase { text-transform: uppercase !important; }
-.text-capitalize { text-transform: capitalize !important; }
+.text-lowercase { text-transform: lowercase !important; }
+.text-uppercase { text-transform: uppercase !important; }
+.text-capitalize { text-transform: capitalize !important; }
// Weight and italics
-.font-weight-normal { font-weight: $font-weight-normal; }
-.font-weight-bold { font-weight: $font-weight-bold; }
-.font-italic { font-style: italic; }
+.font-weight-normal { font-weight: $font-weight-normal; }
+.font-weight-bold { font-weight: $font-weight-bold; }
+.font-italic { font-style: italic; }
// Contextual colors