3 // Easily usable on <ul>, <ol>, or <div>.
7 flex-direction: column;
9 // No need to set list-style: none; since .list-group-item is block level
10 padding-left: 0; // reset padding because ul and ol
12 @include border-radius($list-group-border-radius);
16 // Interactive list items
18 // Use anchor or button elements instead of `li`s or `div`s to create interactive
19 // list items. Includes an extra `.active` modifier class for selected items.
21 .list-group-item-action {
22 width: 100%; // For `<button>`s (anchors become 100% by default though)
23 color: $list-group-action-color;
24 text-align: inherit; // For `<button>`s (anchors inherit)
27 @include hover-focus() {
28 z-index: 1; // Place hover/focus items above their siblings for proper border styling
29 color: $list-group-action-hover-color;
30 text-decoration: none;
31 background-color: $list-group-hover-bg;
35 color: $list-group-action-active-color;
36 background-color: $list-group-action-active-bg;
41 // Individual list items
43 // Use on `li`s or `div`s within the `.list-group` parent.
48 padding: $list-group-item-padding-y $list-group-item-padding-x;
49 color: $list-group-color;
50 text-decoration: if($link-decoration == none, null, none);
51 background-color: $list-group-bg;
52 border: $list-group-border-width solid $list-group-border-color;
55 @include border-top-radius(inherit);
59 @include border-bottom-radius(inherit);
64 color: $list-group-disabled-color;
66 background-color: $list-group-disabled-bg;
69 // Include both here for `<a>`s and `<button>`s
71 z-index: 2; // Place active items above their siblings for proper border styling
72 color: $list-group-active-color;
73 background-color: $list-group-active-bg;
74 border-color: $list-group-active-border-color;
81 margin-top: -$list-group-border-width;
82 border-top-width: $list-group-border-width;
90 // Change the layout of list group items from vertical (default) to horizontal.
92 @each $breakpoint in map-keys($grid-breakpoints) {
93 @include media-breakpoint-up($breakpoint) {
94 $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
96 .list-group-horizontal#{$infix} {
101 @include border-bottom-left-radius($list-group-border-radius);
102 @include border-top-right-radius(0);
106 @include border-top-right-radius($list-group-border-radius);
107 @include border-bottom-left-radius(0);
115 border-top-width: $list-group-border-width;
116 border-left-width: 0;
119 margin-left: -$list-group-border-width;
120 border-left-width: $list-group-border-width;
131 // Remove borders and border-radius to keep list group items edge-to-edge. Most
132 // useful within other components (e.g., cards).
135 @include border-radius(0);
138 border-width: 0 0 $list-group-border-width;
141 border-bottom-width: 0;
147 // Contextual variants
149 // Add modifier classes to change text and background color on individual items.
150 // Organizationally, this must come after the `:hover` states.
152 @each $color, $value in $theme-colors {
153 @include list-group-item-variant($color, theme-color-level($color, -9), theme-color-level($color, 6));