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
15 // Interactive list items
17 // Use anchor or button elements instead of `li`s or `div`s to create interactive
18 // list items. Includes an extra `.active` modifier class for selected items.
20 .list-group-item-action {
21 width: 100%; // For `<button>`s (anchors become 100% by default though)
22 color: $list-group-action-color;
23 text-align: inherit; // For `<button>`s (anchors inherit)
26 @include hover-focus {
27 color: $list-group-action-hover-color;
28 text-decoration: none;
29 background-color: $list-group-hover-bg;
33 color: $list-group-action-active-color;
34 background-color: $list-group-action-active-bg;
39 // Individual list items
41 // Use on `li`s or `div`s within the `.list-group` parent.
46 padding: $list-group-item-padding-y $list-group-item-padding-x;
47 // Place the border on the list items and negative margin up for better styling
48 margin-bottom: -$list-group-border-width;
49 background-color: $list-group-bg;
50 border: $list-group-border-width solid $list-group-border-color;
53 @include border-top-radius($list-group-border-radius);
58 @include border-bottom-radius($list-group-border-radius);
61 @include hover-focus {
62 z-index: 1; // Place hover/active items above their siblings for proper border styling
63 text-decoration: none;
68 color: $list-group-disabled-color;
69 background-color: $list-group-disabled-bg;
72 // Include both here for `<a>`s and `<button>`s
74 z-index: 2; // Place active items above their siblings for proper border styling
75 color: $list-group-active-color;
76 background-color: $list-group-active-bg;
77 border-color: $list-group-active-border-color;
84 // Remove borders and border-radius to keep list group items edge-to-edge. Most
85 // useful within other components (e.g., cards).
91 @include border-radius(0);
95 .list-group-item:first-child {
101 .list-group-item:last-child {
108 // Contextual variants
110 // Add modifier classes to change text and background color on individual items.
111 // Organizationally, this must come after the `:hover` states.
113 @each $color, $value in $theme-colors {
114 @include list-group-item-variant($color, theme-color-level($color, -9), theme-color-level($color, 6));