|
43 | 43 | }
|
44 | 44 | }
|
45 | 45 |
|
46 |
| -// Interactive list items |
47 |
| -// |
48 |
| -// Use anchor or button elements instead of `li`s or `div`s to create interactive |
49 |
| -// list items. Includes an extra `.active` modifier class for selected items. |
50 |
| - |
51 |
| -.list-group-item-action { |
52 |
| - width: 100%; // For `<button>`s (anchors become 100% by default though) |
53 |
| - color: var(--#{$prefix}list-group-action-color); |
54 |
| - text-align: inherit; // For `<button>`s (anchors inherit) |
55 |
| - |
56 |
| - // Hover state |
57 |
| - &:hover, |
58 |
| - &:focus { |
59 |
| - z-index: 1; // Place hover/focus items above their siblings for proper border styling |
60 |
| - color: var(--#{$prefix}list-group-action-hover-color); |
61 |
| - text-decoration: none; |
62 |
| - background-color: var(--#{$prefix}list-group-action-hover-bg); |
63 |
| - } |
64 |
| - |
65 |
| - &:active { |
66 |
| - color: var(--#{$prefix}list-group-action-active-color); |
67 |
| - background-color: var(--#{$prefix}list-group-action-active-bg); |
68 |
| - } |
69 |
| -} |
70 |
| - |
71 | 46 | // Individual list items
|
72 | 47 | //
|
73 | 48 | // Use on `li`s or `div`s within the `.list-group` parent.
|
|
115 | 90 | }
|
116 | 91 | }
|
117 | 92 |
|
| 93 | +// Interactive list items |
| 94 | +// |
| 95 | +// Use anchor or button elements instead of `li`s or `div`s to create interactive |
| 96 | +// list items. Includes an extra `.active` modifier class for selected items. |
| 97 | + |
| 98 | +.list-group-item-action { |
| 99 | + width: 100%; // For `<button>`s (anchors become 100% by default though) |
| 100 | + color: var(--#{$prefix}list-group-action-color); |
| 101 | + text-align: inherit; // For `<button>`s (anchors inherit) |
| 102 | + |
| 103 | + &:not(.active) { |
| 104 | + // Hover state |
| 105 | + &:hover, |
| 106 | + &:focus { |
| 107 | + z-index: 1; // Place hover/focus items above their siblings for proper border styling |
| 108 | + color: var(--#{$prefix}list-group-action-hover-color); |
| 109 | + text-decoration: none; |
| 110 | + background-color: var(--#{$prefix}list-group-action-hover-bg); |
| 111 | + } |
| 112 | + |
| 113 | + &:active { |
| 114 | + color: var(--#{$prefix}list-group-action-active-color); |
| 115 | + background-color: var(--#{$prefix}list-group-action-active-bg); |
| 116 | + } |
| 117 | + } |
| 118 | +} |
| 119 | + |
118 | 120 | // Horizontal
|
119 | 121 | //
|
120 | 122 | // Change the layout of list group items from vertical (default) to horizontal.
|
|
0 commit comments