@coreui/coreui 4.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +183 -0
  3. package/dist/css/coreui-grid.css +5004 -0
  4. package/dist/css/coreui-grid.css.map +1 -0
  5. package/dist/css/coreui-grid.min.css +8 -0
  6. package/dist/css/coreui-grid.min.css.map +1 -0
  7. package/dist/css/coreui-grid.rtl.css +5011 -0
  8. package/dist/css/coreui-grid.rtl.css.map +1 -0
  9. package/dist/css/coreui-grid.rtl.min.css +14 -0
  10. package/dist/css/coreui-grid.rtl.min.css.map +1 -0
  11. package/dist/css/coreui-reboot.css +440 -0
  12. package/dist/css/coreui-reboot.css.map +1 -0
  13. package/dist/css/coreui-reboot.min.css +8 -0
  14. package/dist/css/coreui-reboot.min.css.map +1 -0
  15. package/dist/css/coreui-reboot.rtl.css +441 -0
  16. package/dist/css/coreui-reboot.rtl.css.map +1 -0
  17. package/dist/css/coreui-reboot.rtl.min.css +14 -0
  18. package/dist/css/coreui-reboot.rtl.min.css.map +1 -0
  19. package/dist/css/coreui-utilities.css +5030 -0
  20. package/dist/css/coreui-utilities.css.map +1 -0
  21. package/dist/css/coreui-utilities.min.css +8 -0
  22. package/dist/css/coreui-utilities.min.css.map +1 -0
  23. package/dist/css/coreui-utilities.rtl.css +5024 -0
  24. package/dist/css/coreui-utilities.rtl.css.map +1 -0
  25. package/dist/css/coreui-utilities.rtl.min.css +14 -0
  26. package/dist/css/coreui-utilities.rtl.min.css.map +1 -0
  27. package/dist/css/coreui.css +12152 -0
  28. package/dist/css/coreui.css.map +1 -0
  29. package/dist/css/coreui.min.css +8 -0
  30. package/dist/css/coreui.min.css.map +1 -0
  31. package/dist/css/coreui.rtl.css +12041 -0
  32. package/dist/css/coreui.rtl.css.map +1 -0
  33. package/dist/css/coreui.rtl.min.css +14 -0
  34. package/dist/css/coreui.rtl.min.css.map +1 -0
  35. package/dist/js/coreui.bundle.js +7437 -0
  36. package/dist/js/coreui.bundle.js.map +1 -0
  37. package/dist/js/coreui.bundle.min.js +7 -0
  38. package/dist/js/coreui.bundle.min.js.map +1 -0
  39. package/dist/js/coreui.esm.js +5622 -0
  40. package/dist/js/coreui.esm.js.map +1 -0
  41. package/dist/js/coreui.esm.min.js +7 -0
  42. package/dist/js/coreui.esm.min.js.map +1 -0
  43. package/dist/js/coreui.js +5673 -0
  44. package/dist/js/coreui.js.map +1 -0
  45. package/dist/js/coreui.min.js +7 -0
  46. package/dist/js/coreui.min.js.map +1 -0
  47. package/js/dist/alert.js +208 -0
  48. package/js/dist/alert.js.map +1 -0
  49. package/js/dist/base-component.js +181 -0
  50. package/js/dist/base-component.js.map +1 -0
  51. package/js/dist/button.js +142 -0
  52. package/js/dist/button.js.map +1 -0
  53. package/js/dist/carousel.js +724 -0
  54. package/js/dist/carousel.js.map +1 -0
  55. package/js/dist/collapse.js +515 -0
  56. package/js/dist/collapse.js.map +1 -0
  57. package/js/dist/dom/data.js +72 -0
  58. package/js/dist/dom/data.js.map +1 -0
  59. package/js/dist/dom/event-handler.js +319 -0
  60. package/js/dist/dom/event-handler.js.map +1 -0
  61. package/js/dist/dom/manipulator.js +92 -0
  62. package/js/dist/dom/manipulator.js.map +1 -0
  63. package/js/dist/dom/selector-engine.js +89 -0
  64. package/js/dist/dom/selector-engine.js.map +1 -0
  65. package/js/dist/dropdown.js +700 -0
  66. package/js/dist/dropdown.js.map +1 -0
  67. package/js/dist/modal.js +891 -0
  68. package/js/dist/modal.js.map +1 -0
  69. package/js/dist/offcanvas.js +724 -0
  70. package/js/dist/offcanvas.js.map +1 -0
  71. package/js/dist/popover.js +220 -0
  72. package/js/dist/popover.js.map +1 -0
  73. package/js/dist/scrollspy.js +387 -0
  74. package/js/dist/scrollspy.js.map +1 -0
  75. package/js/dist/tab.js +317 -0
  76. package/js/dist/tab.js.map +1 -0
  77. package/js/dist/toast.js +331 -0
  78. package/js/dist/toast.js.map +1 -0
  79. package/js/dist/tooltip.js +997 -0
  80. package/js/dist/tooltip.js.map +1 -0
  81. package/js/src/alert.js +128 -0
  82. package/js/src/base-component.js +78 -0
  83. package/js/src/button.js +89 -0
  84. package/js/src/carousel.js +589 -0
  85. package/js/src/collapse.js +391 -0
  86. package/js/src/dom/data.js +60 -0
  87. package/js/src/dom/event-handler.js +352 -0
  88. package/js/src/dom/manipulator.js +83 -0
  89. package/js/src/dom/selector-engine.js +78 -0
  90. package/js/src/dropdown.js +517 -0
  91. package/js/src/modal.js +451 -0
  92. package/js/src/navigation.js +298 -0
  93. package/js/src/offcanvas.js +277 -0
  94. package/js/src/popover.js +173 -0
  95. package/js/src/scrollspy.js +298 -0
  96. package/js/src/sidebar.js +347 -0
  97. package/js/src/tab.js +227 -0
  98. package/js/src/toast.js +245 -0
  99. package/js/src/tooltip.js +750 -0
  100. package/js/src/util/backdrop.js +129 -0
  101. package/js/src/util/index.js +327 -0
  102. package/js/src/util/sanitizer.js +130 -0
  103. package/js/src/util/scrollbar.js +97 -0
  104. package/package.json +166 -0
  105. package/scss/_accordion.scss +118 -0
  106. package/scss/_alert.scss +52 -0
  107. package/scss/_avatar.scss +49 -0
  108. package/scss/_badge.scss +38 -0
  109. package/scss/_breadcrumb.scss +33 -0
  110. package/scss/_button-group.scss +139 -0
  111. package/scss/_buttons.scss +143 -0
  112. package/scss/_callout.scss +16 -0
  113. package/scss/_card.scss +215 -0
  114. package/scss/_carousel.scss +231 -0
  115. package/scss/_close.scss +40 -0
  116. package/scss/_containers.scss +41 -0
  117. package/scss/_dropdown.scss +227 -0
  118. package/scss/_footer.scss +25 -0
  119. package/scss/_forms.scss +9 -0
  120. package/scss/_functions.scss +356 -0
  121. package/scss/_grid.scss +56 -0
  122. package/scss/_header.scss +170 -0
  123. package/scss/_helpers.scss +7 -0
  124. package/scss/_icon.scss +32 -0
  125. package/scss/_images.scss +42 -0
  126. package/scss/_list-group.scss +169 -0
  127. package/scss/_mixins.scss +50 -0
  128. package/scss/_modal.scss +219 -0
  129. package/scss/_nav.scss +140 -0
  130. package/scss/_navbar.scss +254 -0
  131. package/scss/_offcanvas.scss +79 -0
  132. package/scss/_pagination.scss +64 -0
  133. package/scss/_popover.scss +158 -0
  134. package/scss/_progress.scss +91 -0
  135. package/scss/_reboot.scss +632 -0
  136. package/scss/_root.scss +25 -0
  137. package/scss/_sidebar.scss +3 -0
  138. package/scss/_spinners.scss +69 -0
  139. package/scss/_subheader.scss +72 -0
  140. package/scss/_tables.scss +166 -0
  141. package/scss/_toasts.scss +52 -0
  142. package/scss/_tooltip.scss +115 -0
  143. package/scss/_transitions.scss +21 -0
  144. package/scss/_type.scss +104 -0
  145. package/scss/_utilities.scss +678 -0
  146. package/scss/_variables.scss +1801 -0
  147. package/scss/coreui-grid.rtl.scss +12 -0
  148. package/scss/coreui-grid.scss +67 -0
  149. package/scss/coreui-reboot.rtl.scss +12 -0
  150. package/scss/coreui-reboot.scss +15 -0
  151. package/scss/coreui-utilities.rtl.scss +12 -0
  152. package/scss/coreui-utilities.scss +19 -0
  153. package/scss/coreui.rtl.scss +12 -0
  154. package/scss/coreui.scss +61 -0
  155. package/scss/forms/_floating-labels.scss +63 -0
  156. package/scss/forms/_form-check.scss +188 -0
  157. package/scss/forms/_form-control.scss +219 -0
  158. package/scss/forms/_form-range.scss +91 -0
  159. package/scss/forms/_form-select.scss +70 -0
  160. package/scss/forms/_form-text.scss +11 -0
  161. package/scss/forms/_input-group.scss +121 -0
  162. package/scss/forms/_labels.scss +36 -0
  163. package/scss/forms/_validation.scss +12 -0
  164. package/scss/helpers/_clearfix.scss +3 -0
  165. package/scss/helpers/_colored-links.scss +12 -0
  166. package/scss/helpers/_position.scss +30 -0
  167. package/scss/helpers/_ratio.scss +26 -0
  168. package/scss/helpers/_stretched-link.scss +15 -0
  169. package/scss/helpers/_text-truncation.scss +7 -0
  170. package/scss/helpers/_visually-hidden.scss +8 -0
  171. package/scss/mixins/_alert.scss +15 -0
  172. package/scss/mixins/_avatar.scss +10 -0
  173. package/scss/mixins/_border-radius.scss +78 -0
  174. package/scss/mixins/_box-shadow.scss +18 -0
  175. package/scss/mixins/_breakpoints.scss +140 -0
  176. package/scss/mixins/_buttons.scss +101 -0
  177. package/scss/mixins/_caret.scss +64 -0
  178. package/scss/mixins/_clearfix.scss +9 -0
  179. package/scss/mixins/_color-scheme.scss +7 -0
  180. package/scss/mixins/_container.scss +9 -0
  181. package/scss/mixins/_css-vars.scss +87 -0
  182. package/scss/mixins/_deprecate.scss +10 -0
  183. package/scss/mixins/_forms.scss +144 -0
  184. package/scss/mixins/_gradients.scss +47 -0
  185. package/scss/mixins/_grid.scss +132 -0
  186. package/scss/mixins/_icon.scss +6 -0
  187. package/scss/mixins/_image.scss +16 -0
  188. package/scss/mixins/_list-group.scss +18 -0
  189. package/scss/mixins/_lists.scss +7 -0
  190. package/scss/mixins/_ltr-rtl.scss +60 -0
  191. package/scss/mixins/_pagination.scss +31 -0
  192. package/scss/mixins/_reset-text.scss +17 -0
  193. package/scss/mixins/_resize.scss +6 -0
  194. package/scss/mixins/_table-variants.scss +16 -0
  195. package/scss/mixins/_text-truncate.scss +8 -0
  196. package/scss/mixins/_transition.scss +26 -0
  197. package/scss/mixins/_utilities.scss +104 -0
  198. package/scss/mixins/_visually-hidden.scss +29 -0
  199. package/scss/sidebar/_sidebar-narrow.scss +106 -0
  200. package/scss/sidebar/_sidebar-nav.scss +165 -0
  201. package/scss/sidebar/_sidebar.scss +261 -0
  202. package/scss/utilities/_api.scss +47 -0
  203. package/scss/vendor/_rfs.scss +354 -0
@@ -0,0 +1,56 @@
1
+ // Row
2
+ //
3
+ // Rows contain your columns.
4
+
5
+ @if $enable-grid-classes {
6
+ .row {
7
+ @include make-row();
8
+
9
+ > * {
10
+ @include make-col-ready();
11
+ }
12
+ }
13
+ }
14
+
15
+ @mixin make-cssgrid($columns: $grid-columns, $breakpoints: $grid-breakpoints) {
16
+ @each $breakpoint in map-keys($breakpoints) {
17
+ $infix: breakpoint-infix($breakpoint, $breakpoints);
18
+
19
+ @include media-breakpoint-up($breakpoint, $breakpoints) {
20
+ @if $columns > 0 {
21
+ @for $i from 1 through $columns {
22
+ .g-col#{$infix}-#{$i} {
23
+ grid-column: auto / span $i;
24
+ }
25
+ }
26
+
27
+ // `$columns - 1` because offsetting by the width of an entire row isn't possible
28
+ @for $i from 0 through ($columns - 1) {
29
+ .g-start#{$infix}-#{$i} {
30
+ grid-column-start: $i;
31
+ }
32
+ }
33
+ }
34
+ }
35
+ }
36
+ }
37
+
38
+ @if $enable-cssgrid {
39
+ .grid {
40
+ display: grid;
41
+ grid-template-rows: repeat(var(--#{$variable-prefix}rows, 1), 1fr);
42
+ grid-template-columns: repeat(var(--#{$variable-prefix}columns, #{$grid-columns}), 1fr);
43
+ gap: var(--#{$variable-prefix}gap, #{$grid-gutter-width});
44
+
45
+ @include make-cssgrid();
46
+ }
47
+ }
48
+
49
+
50
+ // Columns
51
+ //
52
+ // Common styles for small and large grid columns
53
+
54
+ @if $enable-grid-classes {
55
+ @include make-grid-columns();
56
+ }
@@ -0,0 +1,170 @@
1
+ .header {
2
+ position: relative;
3
+ display: flex;
4
+ flex-wrap: wrap; // allow us to do the line break for collapsing content
5
+ align-items: center;
6
+ justify-content: space-between; // space out brand from logo
7
+ min-height: $header-min-height;
8
+ padding: $header-padding-y $header-padding-x;
9
+ background: var(--#{$variable-prefix}header-bg, $header-bg);
10
+ border-bottom: var(--#{$variable-prefix}header-border-width, $header-border-width) solid var(--#{$variable-prefix}header-border-color, $header-border-color);
11
+
12
+ // Because flex properties aren't inherited, we need to redeclare these first
13
+ // few properties so that content nested within behave properly.
14
+ // The `flex-wrap` property is inherited to simplify the expanded navbars
15
+ %container-flex-properties {
16
+ display: flex;
17
+ flex-wrap: inherit;
18
+ align-items: center;
19
+ justify-content: space-between;
20
+ }
21
+
22
+ > .container,
23
+ > .container-fluid {
24
+ @extend %container-flex-properties;
25
+ }
26
+
27
+ @each $breakpoint, $container-max-width in $container-max-widths {
28
+ > .container#{breakpoint-infix($breakpoint, $container-max-widths)} {
29
+ @extend %container-flex-properties;
30
+ }
31
+ }
32
+
33
+ .container:first-child,
34
+ .container-fluid:first-child {
35
+ min-height: $header-min-height - (2 * $header-padding-y);
36
+ }
37
+
38
+ .container:nth-child(n+2),
39
+ .container-fluid:nth-child(n+2) {
40
+ min-height: $subheader-min-height - (2 * $header-padding-y);
41
+ }
42
+
43
+ &.header-sticky {
44
+ position: sticky;
45
+ top: 0;
46
+ z-index: $zindex-fixed - 1;
47
+ }
48
+ }
49
+
50
+ .header-divider {
51
+ flex-basis: calc(100% + #{2 * $header-padding-x}); // stylelint-disable-line function-disallowed-list
52
+ height: 0;
53
+ margin: $header-padding-y (- $header-padding-x);
54
+ border-top: var(--#{$variable-prefix}header-divider-border-width, $header-divider-border-width) solid var(--#{$variable-prefix}header-divider-border-color, $header-divider-border-color);
55
+ }
56
+
57
+ // Header brand
58
+ //
59
+ // Used for brand, project, or site names.
60
+
61
+ .header-brand {
62
+ padding-top: $header-brand-padding-y;
63
+ padding-bottom: $header-brand-padding-y;
64
+ @include ltr-rtl("margin-right", $header-brand-margin-end);
65
+ @include font-size($header-brand-font-size);
66
+ color: var(--#{$variable-prefix}header-brand-color, $header-brand-color);
67
+ text-decoration: if($link-decoration == none, null, none);
68
+ white-space: nowrap;
69
+
70
+ &:hover,
71
+ &:focus {
72
+ color: var(--#{$variable-prefix}header-brand-hover-color, $header-brand-hover-color);
73
+ text-decoration: if($link-hover-decoration == underline, none, null);
74
+ }
75
+ }
76
+
77
+ // Header nav
78
+ //
79
+ // Custom navbar navigation (doesn't require `.nav`, but does make use of `.nav-link`).
80
+
81
+ .header-nav {
82
+ display: flex;
83
+ flex-direction: row; // cannot use `inherit` to get the `.header`s value
84
+ @include ltr-rtl("padding-left", 0);
85
+ margin-bottom: 0;
86
+ list-style: none;
87
+
88
+ .nav-link {
89
+ padding-right: $header-nav-link-padding-x;
90
+ padding-left: $header-nav-link-padding-x;
91
+ color: var(--#{$variable-prefix}header-color, $header-color);
92
+
93
+ &:hover,
94
+ &:focus {
95
+ color: var(--#{$variable-prefix}header-hover-color, $header-hover-color);
96
+ }
97
+
98
+ &.disabled {
99
+ color: var(--#{$variable-prefix}header-disabled-color, $header-disabled-color);
100
+ }
101
+ }
102
+
103
+ .show > .nav-link,
104
+ .nav-link.active {
105
+ color: var(--#{$variable-prefix}header-active-color, $header-active-color);
106
+ }
107
+
108
+ .dropdown-menu {
109
+ position: absolute;
110
+ }
111
+ }
112
+
113
+
114
+ // Header text
115
+ //
116
+ //
117
+
118
+ .header-text {
119
+ padding-top: $nav-link-padding-y;
120
+ padding-bottom: $nav-link-padding-y;
121
+ color: var(--#{$variable-prefix}header-color, $header-color);
122
+
123
+ a {
124
+ color: var(--#{$variable-prefix}header-active-color, $header-active-color);
125
+
126
+ &:hover,
127
+ &:focus {
128
+ color: var(--#{$variable-prefix}header-active-color, $header-active-color);
129
+ }
130
+ }
131
+ }
132
+
133
+ .header-toggler {
134
+ // min-width: 50px;
135
+ padding: $header-toggler-padding-y $header-toggler-padding-x;
136
+ @include font-size($header-toggler-font-size);
137
+ color: var(--#{$variable-prefix}header-color, $header-color);
138
+ background-color: var(--#{$variable-prefix}header-toggler-bg, $header-toggler-bg);
139
+ border: 0; // remove default button style
140
+ // @include borders($header-toggler-border);
141
+ @include border-radius($header-toggler-border-radius);
142
+ // border-color: var(--#{$variable-prefix}header-toggler-border-color, $header-toggler-border-color);
143
+
144
+ &:hover {
145
+ color: $body-color;
146
+ text-decoration: none;
147
+ }
148
+
149
+ &:focus {
150
+ outline: 0;
151
+ }
152
+
153
+ // Opinionated: add "hand" cursor to non-disabled .navbar-toggler elements
154
+ &:not(:disabled) {
155
+ cursor: pointer;
156
+ }
157
+ }
158
+
159
+ .header-toggler-icon {
160
+ display: block;
161
+ height: $header-toggler-font-size * 1.25;
162
+ background-image: var(--#{$variable-prefix}header-toggler-icon-bg, escape-svg($header-toggler-icon-bg));
163
+ background-repeat: no-repeat;
164
+ background-position: center center;
165
+ background-size: 100% 100%;
166
+
167
+ &:hover {
168
+ background-image: var(--#{$variable-prefix}header-toggler-hover-icon-bg, escape-svg($header-toggler-hover-icon-bg));
169
+ }
170
+ }
@@ -0,0 +1,7 @@
1
+ @import "helpers/clearfix";
2
+ @import "helpers/colored-links";
3
+ @import "helpers/ratio";
4
+ @import "helpers/position";
5
+ @import "helpers/visually-hidden";
6
+ @import "helpers/stretched-link";
7
+ @import "helpers/text-truncation";
@@ -0,0 +1,32 @@
1
+ .icon {
2
+ display: inline-block;
3
+ color: inherit;
4
+ text-align: center;
5
+ vertical-align: -.125rem; // Fix the position of icon
6
+ fill: currentColor;
7
+ &:not(.icon-c-s):not(.icon-custom-size) {
8
+ @include icon-size($icon-size-base);
9
+
10
+ &.icon-xxl {
11
+ @include icon-size($icon-size-xxl);
12
+ }
13
+
14
+ &.icon-xl {
15
+ @include icon-size($icon-size-xl);
16
+ }
17
+
18
+ &.icon-lg {
19
+ @include icon-size($icon-size-lg);
20
+ }
21
+
22
+ &.icon-sm {
23
+ @include icon-size($icon-size-sm);
24
+ }
25
+
26
+ @for $i from 3 through 9 {
27
+ &.icon-#{$i}xl {
28
+ @include icon-size($i * $icon-size-base);
29
+ }
30
+ }
31
+ }
32
+ }
@@ -0,0 +1,42 @@
1
+ // Responsive images (ensure images don't scale beyond their parents)
2
+ //
3
+ // This is purposefully opt-in via an explicit class rather than being the default for all `<img>`s.
4
+ // We previously tried the "images are responsive by default" approach in Bootstrap v2,
5
+ // and abandoned it in Bootstrap v3 because it breaks lots of third-party widgets (including Google Maps)
6
+ // which weren't expecting the images within themselves to be involuntarily resized.
7
+ // See also https://github.com/twbs/bootstrap/issues/18178
8
+ .img-fluid {
9
+ @include img-fluid();
10
+ }
11
+
12
+
13
+ // Image thumbnails
14
+ .img-thumbnail {
15
+ padding: $thumbnail-padding;
16
+ background-color: var(--#{$variable-prefix}thumbnail-bg, $thumbnail-bg);
17
+ border: $thumbnail-border-width solid var(--#{$variable-prefix}thumbnail-border-color, $thumbnail-border-color);
18
+ @include border-radius($thumbnail-border-radius);
19
+ @include box-shadow($thumbnail-box-shadow);
20
+
21
+ // Keep them at most 100% wide
22
+ @include img-fluid();
23
+ }
24
+
25
+ //
26
+ // Figures
27
+ //
28
+
29
+ .figure {
30
+ // Ensures the caption's text aligns with the image.
31
+ display: inline-block;
32
+ }
33
+
34
+ .figure-img {
35
+ margin-bottom: $spacer * .5;
36
+ line-height: 1;
37
+ }
38
+
39
+ .figure-caption {
40
+ @include font-size($figure-caption-font-size);
41
+ color: var(--#{$variable-prefix}figure-caption-color, $figure-caption-color);
42
+ }
@@ -0,0 +1,169 @@
1
+ // Base class
2
+ //
3
+ // Easily usable on <ul>, <ol>, or <div>.
4
+
5
+ .list-group {
6
+ display: flex;
7
+ flex-direction: column;
8
+
9
+ // No need to set list-style: none; since .list-group-item is block level
10
+ @include ltr-rtl("padding-left", 0); // reset padding because ul and ol
11
+ margin-bottom: 0;
12
+ @include border-radius($list-group-border-radius);
13
+ }
14
+
15
+ .list-group-numbered {
16
+ list-style-type: none;
17
+ counter-reset: section;
18
+
19
+ > li::before {
20
+ // Increments only this instance of the section counter
21
+ content: counters(section, ".") ". ";
22
+ counter-increment: section;
23
+ }
24
+ }
25
+
26
+
27
+ // Interactive list items
28
+ //
29
+ // Use anchor or button elements instead of `li`s or `div`s to create interactive
30
+ // list items. Includes an extra `.active` modifier class for selected items.
31
+
32
+ .list-group-item-action {
33
+ width: 100%; // For `<button>`s (anchors become 100% by default though)
34
+ color: var(--#{$variable-prefix}list-group-action-color, $list-group-action-color);
35
+ text-align: inherit; // For `<button>`s (anchors inherit)
36
+
37
+ // Hover state
38
+ &:hover,
39
+ &:focus {
40
+ z-index: 1; // Place hover/focus items above their siblings for proper border styling
41
+ color: var(--#{$variable-prefix}list-group-action-hover-color, $list-group-action-hover-color);
42
+ text-decoration: none;
43
+ background-color: var(--#{$variable-prefix}list-group-hover-bg, $list-group-hover-bg);
44
+ }
45
+
46
+ &:active {
47
+ color: var(--#{$variable-prefix}list-group-action-active-color, $list-group-action-active-color);
48
+ background-color: var(--#{$variable-prefix}list-group-action-active-bg, $list-group-action-active-bg);
49
+ border-color: var(--#{$variable-prefix}list-group-action-active-border-color);
50
+ }
51
+ }
52
+
53
+
54
+ // Individual list items
55
+ //
56
+ // Use on `li`s or `div`s within the `.list-group` parent.
57
+
58
+ .list-group-item {
59
+ position: relative;
60
+ display: block;
61
+ padding: $list-group-item-padding-y $list-group-item-padding-x;
62
+ color: var(--#{$variable-prefix}list-group-color, $list-group-color);
63
+ text-decoration: if($link-decoration == none, null, none);
64
+ background-color: var(--#{$variable-prefix}list-group-bg, $list-group-bg);
65
+ border: $list-group-border-width solid var(--#{$variable-prefix}list-group-border-color, $list-group-border-color);
66
+
67
+ &:first-child {
68
+ @include border-top-radius(inherit);
69
+ }
70
+
71
+ &:last-child {
72
+ @include border-bottom-radius(inherit);
73
+ }
74
+
75
+ &.disabled,
76
+ &:disabled {
77
+ color: var(--#{$variable-prefix}list-group-disabled-color, $list-group-disabled-color);
78
+ pointer-events: none;
79
+ background-color: var(--#{$variable-prefix}list-group-disabled-bg, $list-group-disabled-bg);
80
+ }
81
+
82
+ // Include both here for `<a>`s and `<button>`s
83
+ &.active {
84
+ z-index: 2; // Place active items above their siblings for proper border styling
85
+ color: var(--#{$variable-prefix}list-group-active-color, $list-group-active-color);
86
+ background-color: var(--#{$variable-prefix}list-group-active-bg, $list-group-active-bg);
87
+ border-color: var(--#{$variable-prefix}list-group-active-border-color, $list-group-active-border-color);
88
+ }
89
+
90
+ & + & {
91
+ border-top-width: 0;
92
+
93
+ &.active {
94
+ margin-top: -$list-group-border-width;
95
+ border-top-width: $list-group-border-width;
96
+ }
97
+ }
98
+ }
99
+
100
+
101
+ // Horizontal
102
+ //
103
+ // Change the layout of list group items from vertical (default) to horizontal.
104
+
105
+ @each $breakpoint in map-keys($grid-breakpoints) {
106
+ @include media-breakpoint-up($breakpoint) {
107
+ $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
108
+
109
+ .list-group-horizontal#{$infix} {
110
+ flex-direction: row;
111
+
112
+ > .list-group-item {
113
+ &:first-child {
114
+ @include border-bottom-start-radius($list-group-border-radius);
115
+ @include border-top-end-radius(0);
116
+ }
117
+
118
+ &:last-child {
119
+ @include border-top-end-radius($list-group-border-radius);
120
+ @include border-bottom-start-radius(0);
121
+ }
122
+
123
+ &.active {
124
+ margin-top: 0;
125
+ }
126
+
127
+ + .list-group-item {
128
+ border-top-width: $list-group-border-width;
129
+ @include ltr-rtl("border-left-width", 0);
130
+
131
+ &.active {
132
+ @include ltr-rtl("margin-left", -$list-group-border-width);
133
+ @include ltr-rtl("border-left-width", $list-group-border-width);
134
+ }
135
+ }
136
+ }
137
+ }
138
+ }
139
+ }
140
+
141
+
142
+ // Flush list items
143
+ //
144
+ // Remove borders and border-radius to keep list group items edge-to-edge. Most
145
+ // useful within other components (e.g., cards).
146
+
147
+ .list-group-flush {
148
+ @include border-radius(0);
149
+
150
+ > .list-group-item {
151
+ border-width: 0 0 $list-group-border-width;
152
+
153
+ &:last-child {
154
+ border-bottom-width: 0;
155
+ }
156
+ }
157
+ }
158
+
159
+
160
+ // scss-docs-start list-group-modifiers
161
+ // List group contextual variants
162
+ //
163
+ // Add modifier classes to change text and background color on individual items.
164
+ // Organizationally, this must come after the `:hover` states.
165
+
166
+ @each $state, $variant in $list-group-variants {
167
+ @include list-group-item-variant($state, $variant);
168
+ }
169
+ // scss-docs-end list-group-modifiers