0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-29 11:24:18 +01:00

pull in changes from #19832 to fix offcanvas

This commit is contained in:
Mark Otto 2016-12-22 23:43:37 -08:00 committed by Mark Otto
parent 66c87cb7ca
commit ec0dbc74a7
2 changed files with 14 additions and 4 deletions

View File

@ -57,8 +57,8 @@
<div class="row row-offcanvas row-offcanvas-right">
<div class="col-12 col-sm-9">
<p class="float-right hidden-sm-up">
<div class="col-12 col-md-9">
<p class="float-right hidden-md-up">
<button type="button" class="btn btn-primary btn-sm" data-toggle="offcanvas">Toggle nav</button>
</p>
<div class="jumbotron">
@ -99,7 +99,7 @@
</div><!--/row-->
</div><!--/span-->
<div class="col-6 col-sm-3 sidebar-offcanvas" id="sidebar">
<div class="col-6 col-md-3 sidebar-offcanvas" id="sidebar">
<div class="list-group">
<a href="#" class="list-group-item active">Link</a>
<a href="#" class="list-group-item">Link</a>
@ -118,7 +118,7 @@
<hr>
<footer>
<p>&copy; Company 2014</p>
<p>&copy; Company 2017</p>
</footer>
</div><!--/.container-->

View File

@ -34,11 +34,21 @@ footer {
}
.row-offcanvas-right
.sidebar-offcanvas {
right: -100%; /* 12 columns */
}
.row-offcanvas-right.active
.sidebar-offcanvas {
right: -50%; /* 6 columns */
}
.row-offcanvas-left
.sidebar-offcanvas {
left: -100%; /* 12 columns */
}
.row-offcanvas-left.active
.sidebar-offcanvas {
left: -50%; /* 6 columns */
}