django-cotton-bs5 0.2.1__py3-none-any.whl

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 (161) hide show
  1. cotton_bs5/__init__.py +0 -0
  2. cotton_bs5/apps.py +5 -0
  3. cotton_bs5/static/_variables.scss +61 -0
  4. cotton_bs5/static/bs5/_accordion.scss +158 -0
  5. cotton_bs5/static/bs5/_alert.scss +68 -0
  6. cotton_bs5/static/bs5/_badge.scss +38 -0
  7. cotton_bs5/static/bs5/_breadcrumb.scss +40 -0
  8. cotton_bs5/static/bs5/_button-group.scss +142 -0
  9. cotton_bs5/static/bs5/_buttons.scss +216 -0
  10. cotton_bs5/static/bs5/_card.scss +239 -0
  11. cotton_bs5/static/bs5/_carousel.scss +236 -0
  12. cotton_bs5/static/bs5/_close.scss +63 -0
  13. cotton_bs5/static/bs5/_containers.scss +41 -0
  14. cotton_bs5/static/bs5/_dropdown.scss +250 -0
  15. cotton_bs5/static/bs5/_forms.scss +9 -0
  16. cotton_bs5/static/bs5/_functions.scss +302 -0
  17. cotton_bs5/static/bs5/_grid.scss +39 -0
  18. cotton_bs5/static/bs5/_helpers.scss +12 -0
  19. cotton_bs5/static/bs5/_images.scss +42 -0
  20. cotton_bs5/static/bs5/_list-group.scss +197 -0
  21. cotton_bs5/static/bs5/_maps.scss +174 -0
  22. cotton_bs5/static/bs5/_mixins.scss +42 -0
  23. cotton_bs5/static/bs5/_modal.scss +236 -0
  24. cotton_bs5/static/bs5/_nav.scss +197 -0
  25. cotton_bs5/static/bs5/_navbar.scss +289 -0
  26. cotton_bs5/static/bs5/_offcanvas.scss +143 -0
  27. cotton_bs5/static/bs5/_pagination.scss +109 -0
  28. cotton_bs5/static/bs5/_placeholders.scss +51 -0
  29. cotton_bs5/static/bs5/_popover.scss +196 -0
  30. cotton_bs5/static/bs5/_progress.scss +68 -0
  31. cotton_bs5/static/bs5/_reboot.scss +611 -0
  32. cotton_bs5/static/bs5/_root.scss +187 -0
  33. cotton_bs5/static/bs5/_spinners.scss +85 -0
  34. cotton_bs5/static/bs5/_tables.scss +171 -0
  35. cotton_bs5/static/bs5/_toasts.scss +73 -0
  36. cotton_bs5/static/bs5/_tooltip.scss +119 -0
  37. cotton_bs5/static/bs5/_transitions.scss +27 -0
  38. cotton_bs5/static/bs5/_type.scss +106 -0
  39. cotton_bs5/static/bs5/_utilities.scss +806 -0
  40. cotton_bs5/static/bs5/_variables-dark.scss +87 -0
  41. cotton_bs5/static/bs5/_variables.scss +1751 -0
  42. cotton_bs5/static/bs5/bootstrap-grid.scss +62 -0
  43. cotton_bs5/static/bs5/bootstrap-reboot.scss +10 -0
  44. cotton_bs5/static/bs5/bootstrap-utilities.scss +19 -0
  45. cotton_bs5/static/bs5/bootstrap.scss +52 -0
  46. cotton_bs5/static/bs5/forms/_floating-labels.scss +95 -0
  47. cotton_bs5/static/bs5/forms/_form-check.scss +189 -0
  48. cotton_bs5/static/bs5/forms/_form-control.scss +214 -0
  49. cotton_bs5/static/bs5/forms/_form-range.scss +91 -0
  50. cotton_bs5/static/bs5/forms/_form-select.scss +80 -0
  51. cotton_bs5/static/bs5/forms/_form-text.scss +11 -0
  52. cotton_bs5/static/bs5/forms/_input-group.scss +132 -0
  53. cotton_bs5/static/bs5/forms/_labels.scss +36 -0
  54. cotton_bs5/static/bs5/forms/_validation.scss +12 -0
  55. cotton_bs5/static/bs5/helpers/_clearfix.scss +3 -0
  56. cotton_bs5/static/bs5/helpers/_color-bg.scss +7 -0
  57. cotton_bs5/static/bs5/helpers/_colored-links.scss +30 -0
  58. cotton_bs5/static/bs5/helpers/_focus-ring.scss +5 -0
  59. cotton_bs5/static/bs5/helpers/_icon-link.scss +25 -0
  60. cotton_bs5/static/bs5/helpers/_position.scss +36 -0
  61. cotton_bs5/static/bs5/helpers/_ratio.scss +26 -0
  62. cotton_bs5/static/bs5/helpers/_stacks.scss +15 -0
  63. cotton_bs5/static/bs5/helpers/_stretched-link.scss +15 -0
  64. cotton_bs5/static/bs5/helpers/_text-truncation.scss +7 -0
  65. cotton_bs5/static/bs5/helpers/_visually-hidden.scss +8 -0
  66. cotton_bs5/static/bs5/helpers/_vr.scss +8 -0
  67. cotton_bs5/static/bs5/mixins/_alert.scss +18 -0
  68. cotton_bs5/static/bs5/mixins/_backdrop.scss +14 -0
  69. cotton_bs5/static/bs5/mixins/_banner.scss +7 -0
  70. cotton_bs5/static/bs5/mixins/_border-radius.scss +78 -0
  71. cotton_bs5/static/bs5/mixins/_box-shadow.scss +18 -0
  72. cotton_bs5/static/bs5/mixins/_breakpoints.scss +127 -0
  73. cotton_bs5/static/bs5/mixins/_buttons.scss +70 -0
  74. cotton_bs5/static/bs5/mixins/_caret.scss +69 -0
  75. cotton_bs5/static/bs5/mixins/_clearfix.scss +9 -0
  76. cotton_bs5/static/bs5/mixins/_color-mode.scss +21 -0
  77. cotton_bs5/static/bs5/mixins/_color-scheme.scss +7 -0
  78. cotton_bs5/static/bs5/mixins/_container.scss +11 -0
  79. cotton_bs5/static/bs5/mixins/_deprecate.scss +10 -0
  80. cotton_bs5/static/bs5/mixins/_forms.scss +163 -0
  81. cotton_bs5/static/bs5/mixins/_gradients.scss +47 -0
  82. cotton_bs5/static/bs5/mixins/_grid.scss +151 -0
  83. cotton_bs5/static/bs5/mixins/_image.scss +16 -0
  84. cotton_bs5/static/bs5/mixins/_list-group.scss +26 -0
  85. cotton_bs5/static/bs5/mixins/_lists.scss +7 -0
  86. cotton_bs5/static/bs5/mixins/_pagination.scss +10 -0
  87. cotton_bs5/static/bs5/mixins/_reset-text.scss +17 -0
  88. cotton_bs5/static/bs5/mixins/_resize.scss +6 -0
  89. cotton_bs5/static/bs5/mixins/_table-variants.scss +24 -0
  90. cotton_bs5/static/bs5/mixins/_text-truncate.scss +8 -0
  91. cotton_bs5/static/bs5/mixins/_transition.scss +26 -0
  92. cotton_bs5/static/bs5/mixins/_utilities.scss +97 -0
  93. cotton_bs5/static/bs5/mixins/_visually-hidden.scss +33 -0
  94. cotton_bs5/static/bs5/utilities/_api.scss +47 -0
  95. cotton_bs5/static/bs5/vendor/_rfs.scss +348 -0
  96. cotton_bs5/static/stylesheet.scss +120 -0
  97. cotton_bs5/templates/cotton/accordion/body.html +6 -0
  98. cotton_bs5/templates/cotton/accordion/header.html +12 -0
  99. cotton_bs5/templates/cotton/accordion/index.html +6 -0
  100. cotton_bs5/templates/cotton/accordion/item.html +8 -0
  101. cotton_bs5/templates/cotton/alert.html +11 -0
  102. cotton_bs5/templates/cotton/badge.html +6 -0
  103. cotton_bs5/templates/cotton/breadcrumbs/index.html +9 -0
  104. cotton_bs5/templates/cotton/breadcrumbs/item.html +13 -0
  105. cotton_bs5/templates/cotton/button/dismiss.html +9 -0
  106. cotton_bs5/templates/cotton/button/index.html +15 -0
  107. cotton_bs5/templates/cotton/button_group.html +9 -0
  108. cotton_bs5/templates/cotton/card/body.html +4 -0
  109. cotton_bs5/templates/cotton/card/footer.html +4 -0
  110. cotton_bs5/templates/cotton/card/header.html +4 -0
  111. cotton_bs5/templates/cotton/card/index.html +13 -0
  112. cotton_bs5/templates/cotton/card/subtitle.html +2 -0
  113. cotton_bs5/templates/cotton/card/title.html +2 -0
  114. cotton_bs5/templates/cotton/carousel/button.html +9 -0
  115. cotton_bs5/templates/cotton/carousel/caption.html +4 -0
  116. cotton_bs5/templates/cotton/carousel/index.html +12 -0
  117. cotton_bs5/templates/cotton/carousel/item.html +5 -0
  118. cotton_bs5/templates/cotton/collapse.html +11 -0
  119. cotton_bs5/templates/cotton/dropdown/divider.html +1 -0
  120. cotton_bs5/templates/cotton/dropdown/header.html +4 -0
  121. cotton_bs5/templates/cotton/dropdown/index.html +11 -0
  122. cotton_bs5/templates/cotton/dropdown/item.html +15 -0
  123. cotton_bs5/templates/cotton/dropdown/toggle.html +15 -0
  124. cotton_bs5/templates/cotton/grid/col.html +5 -0
  125. cotton_bs5/templates/cotton/grid/index.html +5 -0
  126. cotton_bs5/templates/cotton/list_group/index.html +11 -0
  127. cotton_bs5/templates/cotton/list_group/item.html +9 -0
  128. cotton_bs5/templates/cotton/modal/body.html +1 -0
  129. cotton_bs5/templates/cotton/modal/footer.html +3 -0
  130. cotton_bs5/templates/cotton/modal/header.html +8 -0
  131. cotton_bs5/templates/cotton/modal/index.html +23 -0
  132. cotton_bs5/templates/cotton/modal/title.html +3 -0
  133. cotton_bs5/templates/cotton/nav/index.html +5 -0
  134. cotton_bs5/templates/cotton/nav/link.html +4 -0
  135. cotton_bs5/templates/cotton/navbar/index.html +26 -0
  136. cotton_bs5/templates/cotton/navbar/link.html +9 -0
  137. cotton_bs5/templates/cotton/navbar/links.html +4 -0
  138. cotton_bs5/templates/cotton/offcanvas/body.html +2 -0
  139. cotton_bs5/templates/cotton/offcanvas/footer.html +6 -0
  140. cotton_bs5/templates/cotton/offcanvas/header.html +5 -0
  141. cotton_bs5/templates/cotton/offcanvas/index.html +7 -0
  142. cotton_bs5/templates/cotton/offcanvas/title.html +2 -0
  143. cotton_bs5/templates/cotton/pagination/index.html +6 -0
  144. cotton_bs5/templates/cotton/pagination/link.html +14 -0
  145. cotton_bs5/templates/cotton/placeholder.html +4 -0
  146. cotton_bs5/templates/cotton/progress.html +24 -0
  147. cotton_bs5/templates/cotton/ratio.html +5 -0
  148. cotton_bs5/templates/cotton/spinner.html +9 -0
  149. cotton_bs5/templates/cotton/table.html +15 -0
  150. cotton_bs5/templates/cotton/tabs/content.html +4 -0
  151. cotton_bs5/templates/cotton/tabs/index.html +13 -0
  152. cotton_bs5/templates/cotton/tabs/item.html +18 -0
  153. cotton_bs5/templates/cotton/tabs/pane.html +11 -0
  154. cotton_bs5/templates/cotton/toast/activate.html +17 -0
  155. cotton_bs5/templates/cotton/toast/body.html +3 -0
  156. cotton_bs5/templates/cotton/toast/header.html +5 -0
  157. cotton_bs5/templates/cotton/toast/index.html +9 -0
  158. django_cotton_bs5-0.2.1.dist-info/LICENSE +21 -0
  159. django_cotton_bs5-0.2.1.dist-info/METADATA +78 -0
  160. django_cotton_bs5-0.2.1.dist-info/RECORD +161 -0
  161. django_cotton_bs5-0.2.1.dist-info/WHEEL +4 -0
@@ -0,0 +1,216 @@
1
+ //
2
+ // Base styles
3
+ //
4
+
5
+ .btn {
6
+ // scss-docs-start btn-css-vars
7
+ --#{$prefix}btn-padding-x: #{$btn-padding-x};
8
+ --#{$prefix}btn-padding-y: #{$btn-padding-y};
9
+ --#{$prefix}btn-font-family: #{$btn-font-family};
10
+ @include rfs($btn-font-size, --#{$prefix}btn-font-size);
11
+ --#{$prefix}btn-font-weight: #{$btn-font-weight};
12
+ --#{$prefix}btn-line-height: #{$btn-line-height};
13
+ --#{$prefix}btn-color: #{$btn-color};
14
+ --#{$prefix}btn-bg: transparent;
15
+ --#{$prefix}btn-border-width: #{$btn-border-width};
16
+ --#{$prefix}btn-border-color: transparent;
17
+ --#{$prefix}btn-border-radius: #{$btn-border-radius};
18
+ --#{$prefix}btn-hover-border-color: transparent;
19
+ --#{$prefix}btn-box-shadow: #{$btn-box-shadow};
20
+ --#{$prefix}btn-disabled-opacity: #{$btn-disabled-opacity};
21
+ --#{$prefix}btn-focus-box-shadow: 0 0 0 #{$btn-focus-width} rgba(var(--#{$prefix}btn-focus-shadow-rgb), .5);
22
+ // scss-docs-end btn-css-vars
23
+
24
+ display: inline-block;
25
+ padding: var(--#{$prefix}btn-padding-y) var(--#{$prefix}btn-padding-x);
26
+ font-family: var(--#{$prefix}btn-font-family);
27
+ @include font-size(var(--#{$prefix}btn-font-size));
28
+ font-weight: var(--#{$prefix}btn-font-weight);
29
+ line-height: var(--#{$prefix}btn-line-height);
30
+ color: var(--#{$prefix}btn-color);
31
+ text-align: center;
32
+ text-decoration: if($link-decoration == none, null, none);
33
+ white-space: $btn-white-space;
34
+ vertical-align: middle;
35
+ cursor: if($enable-button-pointers, pointer, null);
36
+ user-select: none;
37
+ border: var(--#{$prefix}btn-border-width) solid var(--#{$prefix}btn-border-color);
38
+ @include border-radius(var(--#{$prefix}btn-border-radius));
39
+ @include gradient-bg(var(--#{$prefix}btn-bg));
40
+ @include box-shadow(var(--#{$prefix}btn-box-shadow));
41
+ @include transition($btn-transition);
42
+
43
+ &:hover {
44
+ color: var(--#{$prefix}btn-hover-color);
45
+ text-decoration: if($link-hover-decoration == underline, none, null);
46
+ background-color: var(--#{$prefix}btn-hover-bg);
47
+ border-color: var(--#{$prefix}btn-hover-border-color);
48
+ }
49
+
50
+ .btn-check + &:hover {
51
+ // override for the checkbox/radio buttons
52
+ color: var(--#{$prefix}btn-color);
53
+ background-color: var(--#{$prefix}btn-bg);
54
+ border-color: var(--#{$prefix}btn-border-color);
55
+ }
56
+
57
+ &:focus-visible {
58
+ color: var(--#{$prefix}btn-hover-color);
59
+ @include gradient-bg(var(--#{$prefix}btn-hover-bg));
60
+ border-color: var(--#{$prefix}btn-hover-border-color);
61
+ outline: 0;
62
+ // Avoid using mixin so we can pass custom focus shadow properly
63
+ @if $enable-shadows {
64
+ box-shadow: var(--#{$prefix}btn-box-shadow), var(--#{$prefix}btn-focus-box-shadow);
65
+ } @else {
66
+ box-shadow: var(--#{$prefix}btn-focus-box-shadow);
67
+ }
68
+ }
69
+
70
+ .btn-check:focus-visible + & {
71
+ border-color: var(--#{$prefix}btn-hover-border-color);
72
+ outline: 0;
73
+ // Avoid using mixin so we can pass custom focus shadow properly
74
+ @if $enable-shadows {
75
+ box-shadow: var(--#{$prefix}btn-box-shadow), var(--#{$prefix}btn-focus-box-shadow);
76
+ } @else {
77
+ box-shadow: var(--#{$prefix}btn-focus-box-shadow);
78
+ }
79
+ }
80
+
81
+ .btn-check:checked + &,
82
+ :not(.btn-check) + &:active,
83
+ &:first-child:active,
84
+ &.active,
85
+ &.show {
86
+ color: var(--#{$prefix}btn-active-color);
87
+ background-color: var(--#{$prefix}btn-active-bg);
88
+ // Remove CSS gradients if they're enabled
89
+ background-image: if($enable-gradients, none, null);
90
+ border-color: var(--#{$prefix}btn-active-border-color);
91
+ @include box-shadow(var(--#{$prefix}btn-active-shadow));
92
+
93
+ &:focus-visible {
94
+ // Avoid using mixin so we can pass custom focus shadow properly
95
+ @if $enable-shadows {
96
+ box-shadow: var(--#{$prefix}btn-active-shadow), var(--#{$prefix}btn-focus-box-shadow);
97
+ } @else {
98
+ box-shadow: var(--#{$prefix}btn-focus-box-shadow);
99
+ }
100
+ }
101
+ }
102
+
103
+ .btn-check:checked:focus-visible + & {
104
+ // Avoid using mixin so we can pass custom focus shadow properly
105
+ @if $enable-shadows {
106
+ box-shadow: var(--#{$prefix}btn-active-shadow), var(--#{$prefix}btn-focus-box-shadow);
107
+ } @else {
108
+ box-shadow: var(--#{$prefix}btn-focus-box-shadow);
109
+ }
110
+ }
111
+
112
+ &:disabled,
113
+ &.disabled,
114
+ fieldset:disabled & {
115
+ color: var(--#{$prefix}btn-disabled-color);
116
+ pointer-events: none;
117
+ background-color: var(--#{$prefix}btn-disabled-bg);
118
+ background-image: if($enable-gradients, none, null);
119
+ border-color: var(--#{$prefix}btn-disabled-border-color);
120
+ opacity: var(--#{$prefix}btn-disabled-opacity);
121
+ @include box-shadow(none);
122
+ }
123
+ }
124
+
125
+
126
+ //
127
+ // Alternate buttons
128
+ //
129
+
130
+ // scss-docs-start btn-variant-loops
131
+ @each $color, $value in $theme-colors {
132
+ .btn-#{$color} {
133
+ @if $color == "light" {
134
+ @include button-variant(
135
+ $value,
136
+ $value,
137
+ $hover-background: shade-color($value, $btn-hover-bg-shade-amount),
138
+ $hover-border: shade-color($value, $btn-hover-border-shade-amount),
139
+ $active-background: shade-color($value, $btn-active-bg-shade-amount),
140
+ $active-border: shade-color($value, $btn-active-border-shade-amount)
141
+ );
142
+ } @else if $color == "dark" {
143
+ @include button-variant(
144
+ $value,
145
+ $value,
146
+ $hover-background: tint-color($value, $btn-hover-bg-tint-amount),
147
+ $hover-border: tint-color($value, $btn-hover-border-tint-amount),
148
+ $active-background: tint-color($value, $btn-active-bg-tint-amount),
149
+ $active-border: tint-color($value, $btn-active-border-tint-amount)
150
+ );
151
+ } @else {
152
+ @include button-variant($value, $value);
153
+ }
154
+ }
155
+ }
156
+
157
+ @each $color, $value in $theme-colors {
158
+ .btn-outline-#{$color} {
159
+ @include button-outline-variant($value);
160
+ }
161
+ }
162
+ // scss-docs-end btn-variant-loops
163
+
164
+
165
+ //
166
+ // Link buttons
167
+ //
168
+
169
+ // Make a button look and behave like a link
170
+ .btn-link {
171
+ --#{$prefix}btn-font-weight: #{$font-weight-normal};
172
+ --#{$prefix}btn-color: #{$btn-link-color};
173
+ --#{$prefix}btn-bg: transparent;
174
+ --#{$prefix}btn-border-color: transparent;
175
+ --#{$prefix}btn-hover-color: #{$btn-link-hover-color};
176
+ --#{$prefix}btn-hover-border-color: transparent;
177
+ --#{$prefix}btn-active-color: #{$btn-link-hover-color};
178
+ --#{$prefix}btn-active-border-color: transparent;
179
+ --#{$prefix}btn-disabled-color: #{$btn-link-disabled-color};
180
+ --#{$prefix}btn-disabled-border-color: transparent;
181
+ --#{$prefix}btn-box-shadow: 0 0 0 #000; // Can't use `none` as keyword negates all values when used with multiple shadows
182
+ --#{$prefix}btn-focus-shadow-rgb: #{$btn-link-focus-shadow-rgb};
183
+
184
+ text-decoration: $link-decoration;
185
+ @if $enable-gradients {
186
+ background-image: none;
187
+ }
188
+
189
+ &:hover,
190
+ &:focus-visible {
191
+ text-decoration: $link-hover-decoration;
192
+ }
193
+
194
+ &:focus-visible {
195
+ color: var(--#{$prefix}btn-color);
196
+ }
197
+
198
+ &:hover {
199
+ color: var(--#{$prefix}btn-hover-color);
200
+ }
201
+
202
+ // No need for an active state here
203
+ }
204
+
205
+
206
+ //
207
+ // Button Sizes
208
+ //
209
+
210
+ .btn-lg {
211
+ @include button-size($btn-padding-y-lg, $btn-padding-x-lg, $btn-font-size-lg, $btn-border-radius-lg);
212
+ }
213
+
214
+ .btn-sm {
215
+ @include button-size($btn-padding-y-sm, $btn-padding-x-sm, $btn-font-size-sm, $btn-border-radius-sm);
216
+ }
@@ -0,0 +1,239 @@
1
+ //
2
+ // Base styles
3
+ //
4
+
5
+ .card {
6
+ // scss-docs-start card-css-vars
7
+ --#{$prefix}card-spacer-y: #{$card-spacer-y};
8
+ --#{$prefix}card-spacer-x: #{$card-spacer-x};
9
+ --#{$prefix}card-title-spacer-y: #{$card-title-spacer-y};
10
+ --#{$prefix}card-title-color: #{$card-title-color};
11
+ --#{$prefix}card-subtitle-color: #{$card-subtitle-color};
12
+ --#{$prefix}card-border-width: #{$card-border-width};
13
+ --#{$prefix}card-border-color: #{$card-border-color};
14
+ --#{$prefix}card-border-radius: #{$card-border-radius};
15
+ --#{$prefix}card-box-shadow: #{$card-box-shadow};
16
+ --#{$prefix}card-inner-border-radius: #{$card-inner-border-radius};
17
+ --#{$prefix}card-cap-padding-y: #{$card-cap-padding-y};
18
+ --#{$prefix}card-cap-padding-x: #{$card-cap-padding-x};
19
+ --#{$prefix}card-cap-bg: #{$card-cap-bg};
20
+ --#{$prefix}card-cap-color: #{$card-cap-color};
21
+ --#{$prefix}card-height: #{$card-height};
22
+ --#{$prefix}card-color: #{$card-color};
23
+ --#{$prefix}card-bg: #{$card-bg};
24
+ --#{$prefix}card-img-overlay-padding: #{$card-img-overlay-padding};
25
+ --#{$prefix}card-group-margin: #{$card-group-margin};
26
+ // scss-docs-end card-css-vars
27
+
28
+ position: relative;
29
+ display: flex;
30
+ flex-direction: column;
31
+ min-width: 0; // See https://github.com/twbs/bootstrap/pull/22740#issuecomment-305868106
32
+ height: var(--#{$prefix}card-height);
33
+ color: var(--#{$prefix}body-color);
34
+ word-wrap: break-word;
35
+ background-color: var(--#{$prefix}card-bg);
36
+ background-clip: border-box;
37
+ border: var(--#{$prefix}card-border-width) solid var(--#{$prefix}card-border-color);
38
+ @include border-radius(var(--#{$prefix}card-border-radius));
39
+ @include box-shadow(var(--#{$prefix}card-box-shadow));
40
+
41
+ > hr {
42
+ margin-right: 0;
43
+ margin-left: 0;
44
+ }
45
+
46
+ > .list-group {
47
+ border-top: inherit;
48
+ border-bottom: inherit;
49
+
50
+ &:first-child {
51
+ border-top-width: 0;
52
+ @include border-top-radius(var(--#{$prefix}card-inner-border-radius));
53
+ }
54
+
55
+ &:last-child {
56
+ border-bottom-width: 0;
57
+ @include border-bottom-radius(var(--#{$prefix}card-inner-border-radius));
58
+ }
59
+ }
60
+
61
+ // Due to specificity of the above selector (`.card > .list-group`), we must
62
+ // use a child selector here to prevent double borders.
63
+ > .card-header + .list-group,
64
+ > .list-group + .card-footer {
65
+ border-top: 0;
66
+ }
67
+ }
68
+
69
+ .card-body {
70
+ // Enable `flex-grow: 1` for decks and groups so that card blocks take up
71
+ // as much space as possible, ensuring footers are aligned to the bottom.
72
+ flex: 1 1 auto;
73
+ padding: var(--#{$prefix}card-spacer-y) var(--#{$prefix}card-spacer-x);
74
+ color: var(--#{$prefix}card-color);
75
+ }
76
+
77
+ .card-title {
78
+ margin-bottom: var(--#{$prefix}card-title-spacer-y);
79
+ color: var(--#{$prefix}card-title-color);
80
+ }
81
+
82
+ .card-subtitle {
83
+ margin-top: calc(-.5 * var(--#{$prefix}card-title-spacer-y)); // stylelint-disable-line function-disallowed-list
84
+ margin-bottom: 0;
85
+ color: var(--#{$prefix}card-subtitle-color);
86
+ }
87
+
88
+ .card-text:last-child {
89
+ margin-bottom: 0;
90
+ }
91
+
92
+ .card-link {
93
+ &:hover {
94
+ text-decoration: if($link-hover-decoration == underline, none, null);
95
+ }
96
+
97
+ + .card-link {
98
+ margin-left: var(--#{$prefix}card-spacer-x);
99
+ }
100
+ }
101
+
102
+ //
103
+ // Optional textual caps
104
+ //
105
+
106
+ .card-header {
107
+ padding: var(--#{$prefix}card-cap-padding-y) var(--#{$prefix}card-cap-padding-x);
108
+ margin-bottom: 0; // Removes the default margin-bottom of <hN>
109
+ color: var(--#{$prefix}card-cap-color);
110
+ background-color: var(--#{$prefix}card-cap-bg);
111
+ border-bottom: var(--#{$prefix}card-border-width) solid var(--#{$prefix}card-border-color);
112
+
113
+ &:first-child {
114
+ @include border-radius(var(--#{$prefix}card-inner-border-radius) var(--#{$prefix}card-inner-border-radius) 0 0);
115
+ }
116
+ }
117
+
118
+ .card-footer {
119
+ padding: var(--#{$prefix}card-cap-padding-y) var(--#{$prefix}card-cap-padding-x);
120
+ color: var(--#{$prefix}card-cap-color);
121
+ background-color: var(--#{$prefix}card-cap-bg);
122
+ border-top: var(--#{$prefix}card-border-width) solid var(--#{$prefix}card-border-color);
123
+
124
+ &:last-child {
125
+ @include border-radius(0 0 var(--#{$prefix}card-inner-border-radius) var(--#{$prefix}card-inner-border-radius));
126
+ }
127
+ }
128
+
129
+
130
+ //
131
+ // Header navs
132
+ //
133
+
134
+ .card-header-tabs {
135
+ margin-right: calc(-.5 * var(--#{$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list
136
+ margin-bottom: calc(-1 * var(--#{$prefix}card-cap-padding-y)); // stylelint-disable-line function-disallowed-list
137
+ margin-left: calc(-.5 * var(--#{$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list
138
+ border-bottom: 0;
139
+
140
+ .nav-link.active {
141
+ background-color: var(--#{$prefix}card-bg);
142
+ border-bottom-color: var(--#{$prefix}card-bg);
143
+ }
144
+ }
145
+
146
+ .card-header-pills {
147
+ margin-right: calc(-.5 * var(--#{$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list
148
+ margin-left: calc(-.5 * var(--#{$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list
149
+ }
150
+
151
+ // Card image
152
+ .card-img-overlay {
153
+ position: absolute;
154
+ top: 0;
155
+ right: 0;
156
+ bottom: 0;
157
+ left: 0;
158
+ padding: var(--#{$prefix}card-img-overlay-padding);
159
+ @include border-radius(var(--#{$prefix}card-inner-border-radius));
160
+ }
161
+
162
+ .card-img,
163
+ .card-img-top,
164
+ .card-img-bottom {
165
+ width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
166
+ }
167
+
168
+ .card-img,
169
+ .card-img-top {
170
+ @include border-top-radius(var(--#{$prefix}card-inner-border-radius));
171
+ }
172
+
173
+ .card-img,
174
+ .card-img-bottom {
175
+ @include border-bottom-radius(var(--#{$prefix}card-inner-border-radius));
176
+ }
177
+
178
+
179
+ //
180
+ // Card groups
181
+ //
182
+
183
+ .card-group {
184
+ // The child selector allows nested `.card` within `.card-group`
185
+ // to display properly.
186
+ > .card {
187
+ margin-bottom: var(--#{$prefix}card-group-margin);
188
+ }
189
+
190
+ @include media-breakpoint-up(sm) {
191
+ display: flex;
192
+ flex-flow: row wrap;
193
+ // The child selector allows nested `.card` within `.card-group`
194
+ // to display properly.
195
+ > .card {
196
+ // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
197
+ flex: 1 0 0%;
198
+ margin-bottom: 0;
199
+
200
+ + .card {
201
+ margin-left: 0;
202
+ border-left: 0;
203
+ }
204
+
205
+ // Handle rounded corners
206
+ @if $enable-rounded {
207
+ &:not(:last-child) {
208
+ @include border-end-radius(0);
209
+
210
+ .card-img-top,
211
+ .card-header {
212
+ // stylelint-disable-next-line property-disallowed-list
213
+ border-top-right-radius: 0;
214
+ }
215
+ .card-img-bottom,
216
+ .card-footer {
217
+ // stylelint-disable-next-line property-disallowed-list
218
+ border-bottom-right-radius: 0;
219
+ }
220
+ }
221
+
222
+ &:not(:first-child) {
223
+ @include border-start-radius(0);
224
+
225
+ .card-img-top,
226
+ .card-header {
227
+ // stylelint-disable-next-line property-disallowed-list
228
+ border-top-left-radius: 0;
229
+ }
230
+ .card-img-bottom,
231
+ .card-footer {
232
+ // stylelint-disable-next-line property-disallowed-list
233
+ border-bottom-left-radius: 0;
234
+ }
235
+ }
236
+ }
237
+ }
238
+ }
239
+ }
@@ -0,0 +1,236 @@
1
+ // Notes on the classes:
2
+ //
3
+ // 1. .carousel.pointer-event should ideally be pan-y (to allow for users to scroll vertically)
4
+ // even when their scroll action started on a carousel, but for compatibility (with Firefox)
5
+ // we're preventing all actions instead
6
+ // 2. The .carousel-item-start and .carousel-item-end is used to indicate where
7
+ // the active slide is heading.
8
+ // 3. .active.carousel-item is the current slide.
9
+ // 4. .active.carousel-item-start and .active.carousel-item-end is the current
10
+ // slide in its in-transition state. Only one of these occurs at a time.
11
+ // 5. .carousel-item-next.carousel-item-start and .carousel-item-prev.carousel-item-end
12
+ // is the upcoming slide in transition.
13
+
14
+ .carousel {
15
+ position: relative;
16
+ }
17
+
18
+ .carousel.pointer-event {
19
+ touch-action: pan-y;
20
+ }
21
+
22
+ .carousel-inner {
23
+ position: relative;
24
+ width: 100%;
25
+ overflow: hidden;
26
+ @include clearfix();
27
+ }
28
+
29
+ .carousel-item {
30
+ position: relative;
31
+ display: none;
32
+ float: left;
33
+ width: 100%;
34
+ margin-right: -100%;
35
+ backface-visibility: hidden;
36
+ @include transition($carousel-transition);
37
+ }
38
+
39
+ .carousel-item.active,
40
+ .carousel-item-next,
41
+ .carousel-item-prev {
42
+ display: block;
43
+ }
44
+
45
+ .carousel-item-next:not(.carousel-item-start),
46
+ .active.carousel-item-end {
47
+ transform: translateX(100%);
48
+ }
49
+
50
+ .carousel-item-prev:not(.carousel-item-end),
51
+ .active.carousel-item-start {
52
+ transform: translateX(-100%);
53
+ }
54
+
55
+
56
+ //
57
+ // Alternate transitions
58
+ //
59
+
60
+ .carousel-fade {
61
+ .carousel-item {
62
+ opacity: 0;
63
+ transition-property: opacity;
64
+ transform: none;
65
+ }
66
+
67
+ .carousel-item.active,
68
+ .carousel-item-next.carousel-item-start,
69
+ .carousel-item-prev.carousel-item-end {
70
+ z-index: 1;
71
+ opacity: 1;
72
+ }
73
+
74
+ .active.carousel-item-start,
75
+ .active.carousel-item-end {
76
+ z-index: 0;
77
+ opacity: 0;
78
+ @include transition(opacity 0s $carousel-transition-duration);
79
+ }
80
+ }
81
+
82
+
83
+ //
84
+ // Left/right controls for nav
85
+ //
86
+
87
+ .carousel-control-prev,
88
+ .carousel-control-next {
89
+ position: absolute;
90
+ top: 0;
91
+ bottom: 0;
92
+ z-index: 1;
93
+ // Use flex for alignment (1-3)
94
+ display: flex; // 1. allow flex styles
95
+ align-items: center; // 2. vertically center contents
96
+ justify-content: center; // 3. horizontally center contents
97
+ width: $carousel-control-width;
98
+ padding: 0;
99
+ color: $carousel-control-color;
100
+ text-align: center;
101
+ background: none;
102
+ border: 0;
103
+ opacity: $carousel-control-opacity;
104
+ @include transition($carousel-control-transition);
105
+
106
+ // Hover/focus state
107
+ &:hover,
108
+ &:focus {
109
+ color: $carousel-control-color;
110
+ text-decoration: none;
111
+ outline: 0;
112
+ opacity: $carousel-control-hover-opacity;
113
+ }
114
+ }
115
+ .carousel-control-prev {
116
+ left: 0;
117
+ background-image: if($enable-gradients, linear-gradient(90deg, rgba($black, .25), rgba($black, .001)), null);
118
+ }
119
+ .carousel-control-next {
120
+ right: 0;
121
+ background-image: if($enable-gradients, linear-gradient(270deg, rgba($black, .25), rgba($black, .001)), null);
122
+ }
123
+
124
+ // Icons for within
125
+ .carousel-control-prev-icon,
126
+ .carousel-control-next-icon {
127
+ display: inline-block;
128
+ width: $carousel-control-icon-width;
129
+ height: $carousel-control-icon-width;
130
+ background-repeat: no-repeat;
131
+ background-position: 50%;
132
+ background-size: 100% 100%;
133
+ }
134
+
135
+ .carousel-control-prev-icon {
136
+ background-image: escape-svg($carousel-control-prev-icon-bg) #{"/*rtl:" + escape-svg($carousel-control-next-icon-bg) + "*/"};
137
+ }
138
+ .carousel-control-next-icon {
139
+ background-image: escape-svg($carousel-control-next-icon-bg) #{"/*rtl:" + escape-svg($carousel-control-prev-icon-bg) + "*/"};
140
+ }
141
+
142
+ // Optional indicator pips/controls
143
+ //
144
+ // Add a container (such as a list) with the following class and add an item (ideally a focusable control,
145
+ // like a button) with data-bs-target for each slide your carousel holds.
146
+
147
+ .carousel-indicators {
148
+ position: absolute;
149
+ right: 0;
150
+ bottom: 0;
151
+ left: 0;
152
+ z-index: 2;
153
+ display: flex;
154
+ justify-content: center;
155
+ padding: 0;
156
+ // Use the .carousel-control's width as margin so we don't overlay those
157
+ margin-right: $carousel-control-width;
158
+ margin-bottom: 1rem;
159
+ margin-left: $carousel-control-width;
160
+
161
+ [data-bs-target] {
162
+ box-sizing: content-box;
163
+ flex: 0 1 auto;
164
+ width: $carousel-indicator-width;
165
+ height: $carousel-indicator-height;
166
+ padding: 0;
167
+ margin-right: $carousel-indicator-spacer;
168
+ margin-left: $carousel-indicator-spacer;
169
+ text-indent: -999px;
170
+ cursor: pointer;
171
+ background-color: $carousel-indicator-active-bg;
172
+ background-clip: padding-box;
173
+ border: 0;
174
+ // Use transparent borders to increase the hit area by 10px on top and bottom.
175
+ border-top: $carousel-indicator-hit-area-height solid transparent;
176
+ border-bottom: $carousel-indicator-hit-area-height solid transparent;
177
+ opacity: $carousel-indicator-opacity;
178
+ @include transition($carousel-indicator-transition);
179
+ }
180
+
181
+ .active {
182
+ opacity: $carousel-indicator-active-opacity;
183
+ }
184
+ }
185
+
186
+
187
+ // Optional captions
188
+ //
189
+ //
190
+
191
+ .carousel-caption {
192
+ position: absolute;
193
+ right: (100% - $carousel-caption-width) * .5;
194
+ bottom: $carousel-caption-spacer;
195
+ left: (100% - $carousel-caption-width) * .5;
196
+ padding-top: $carousel-caption-padding-y;
197
+ padding-bottom: $carousel-caption-padding-y;
198
+ color: $carousel-caption-color;
199
+ text-align: center;
200
+ }
201
+
202
+ // Dark mode carousel
203
+
204
+ @mixin carousel-dark() {
205
+ .carousel-control-prev-icon,
206
+ .carousel-control-next-icon {
207
+ filter: $carousel-dark-control-icon-filter;
208
+ }
209
+
210
+ .carousel-indicators [data-bs-target] {
211
+ background-color: $carousel-dark-indicator-active-bg;
212
+ }
213
+
214
+ .carousel-caption {
215
+ color: $carousel-dark-caption-color;
216
+ }
217
+ }
218
+
219
+ .carousel-dark {
220
+ @include carousel-dark();
221
+ }
222
+
223
+ @if $enable-dark-mode {
224
+ @include color-mode(dark) {
225
+ @if $color-mode-type == "media-query" {
226
+ .carousel {
227
+ @include carousel-dark();
228
+ }
229
+ } @else {
230
+ .carousel,
231
+ &.carousel {
232
+ @include carousel-dark();
233
+ }
234
+ }
235
+ }
236
+ }