1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-22 21:22:52 +02:00

First pass at .row-cols classes

Trying to find a new way to do responsive card decks while not locking ourselves into the cards themselves. My thinking here is we can easily control the column (.col) width by the parent, but I don't know how many we need (have 0-5 now) across each breakpoint. This works for cards so far, and I think could get us equal height, too.
This commit is contained in:
Mark Otto
2019-07-18 02:27:53 +03:00
committed by Mark Otto
parent 4041d70eb5
commit e2252e0230
3 changed files with 144 additions and 1 deletions

View File

@@ -175,6 +175,18 @@
}
}
$row-columns: 6 !default;
@each $breakpoint in map-keys($grid-breakpoints) {
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
@for $i from 1 through $row-columns {
.row-cols#{$infix}-#{$i} > [class^="col"] {
flex: 0 0 calc(100% / #{$i});
}
}
}
//
// Card groups