1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00

use flex and direction to do the stacked controls instead of float hacks

This also fixes #21280. Previously, we were using float and clear on the individual controls, but that meant a computer height of `0` for the parent `.custom-controls-stacked`. No more problem after using flexbox though.
This commit is contained in:
Mark Otto 2016-12-25 14:11:49 -08:00 committed by Mark Otto
parent 82061b25c4
commit 30fd1590d3

View file

@ -114,10 +114,11 @@
// set. Use these optional classes to tweak the layout. // set. Use these optional classes to tweak the layout.
.custom-controls-stacked { .custom-controls-stacked {
display: flex;
flex-direction: column;
.custom-control { .custom-control {
float: left;
margin-bottom: $custom-control-spacer-y; margin-bottom: $custom-control-spacer-y;
clear: left;
+ .custom-control { + .custom-control {
margin-left: 0; margin-left: 0;