Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Otto <otto@github.com>2019-01-07 04:01:36 +0300
committerXhmikosR <xhmikosr@gmail.com>2019-01-07 04:01:36 +0300
commite6b1eefc7392478c4acedaebc3c6b27a47e586c4 (patch)
tree72f9b8959bb5ce2cd3ea0a9ca5819ad5d79b830a /scss/_list-group.scss
parent42bed436e86103ba85e56ea76a1c6cc6d16218ba (diff)
Add horizontal list group modifier (#27970)
Alternate take to #27683 that builds the modifier class based on min-width, such that list groups are stacked until the class's breakpoint is reached. This is less verbose, matches our primary responsive approach, and prevents an extra class. Unfortunately, I believe supporting flush list groups is too much code here, so I've skipped that and made a note in the docs. Also added examples generate from our breakpoints data file with a protip for how to do equal width items.
Diffstat (limited to 'scss/_list-group.scss')
-rw-r--r--scss/_list-group.scss33
1 files changed, 33 insertions, 0 deletions
diff --git a/scss/_list-group.scss b/scss/_list-group.scss
index 796cc461f4..e688f959f7 100644
--- a/scss/_list-group.scss
+++ b/scss/_list-group.scss
@@ -80,6 +80,39 @@
}
+// Horizontal
+//
+// Change the layout of list group items from vertical (default) to horizontal.
+
+@each $breakpoint in map-keys($grid-breakpoints) {
+ @include media-breakpoint-up($breakpoint) {
+ $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
+
+ @each $value in $displays {
+ .list-group-horizontal#{$infix} {
+ flex-direction: row;
+
+ .list-group-item {
+ margin-right: -$list-group-border-width;
+ margin-bottom: 0;
+
+ &:first-child {
+ @include border-left-radius($list-group-border-radius);
+ @include border-top-right-radius(0);
+ }
+
+ &:last-child {
+ margin-right: 0;
+ @include border-right-radius($list-group-border-radius);
+ @include border-bottom-left-radius(0);
+ }
+ }
+ }
+ }
+ }
+}
+
+
// Flush list items
//
// Remove borders and border-radius to keep list group items edge-to-edge. Most