@swisspost/design-system-styles 5.0.0-alpha.7

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 (188) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +40 -0
  3. package/basics.css +29 -0
  4. package/basics.scss +9 -0
  5. package/components/_index.scss +45 -0
  6. package/components/accordion.scss +94 -0
  7. package/components/alert.scss +214 -0
  8. package/components/badge.scss +85 -0
  9. package/components/base.scss +6 -0
  10. package/components/breadcrumb.scss +42 -0
  11. package/components/button-group.scss +69 -0
  12. package/components/button.scss +213 -0
  13. package/components/card.scss +211 -0
  14. package/components/carousel.scss +176 -0
  15. package/components/close.scss +33 -0
  16. package/components/datatable.scss +196 -0
  17. package/components/datepicker.scss +232 -0
  18. package/components/dropdown.scss +83 -0
  19. package/components/floating-label.scss +77 -0
  20. package/components/fonts.scss +27 -0
  21. package/components/form-check.scss +236 -0
  22. package/components/form-feedback.scss +32 -0
  23. package/components/form-range.scss +111 -0
  24. package/components/form-select.scss +31 -0
  25. package/components/forms.scss +54 -0
  26. package/components/grid.scss +100 -0
  27. package/components/icons.scss +60 -0
  28. package/components/intranet-header/_icon.scss +6 -0
  29. package/components/intranet-header/_language-chooser.scss +40 -0
  30. package/components/intranet-header/_logo.scss +54 -0
  31. package/components/intranet-header/_nav-overflow.scss +56 -0
  32. package/components/intranet-header/_scaffolding.scss +96 -0
  33. package/components/intranet-header/_searchbox.scss +32 -0
  34. package/components/intranet-header/_settings.scss +23 -0
  35. package/components/intranet-header/_sidebar.scss +118 -0
  36. package/components/intranet-header/_top-navigation.scss +109 -0
  37. package/components/intranet-header/index.scss +17 -0
  38. package/components/list-group.scss +166 -0
  39. package/components/modal.scss +62 -0
  40. package/components/offcanvas.scss +5 -0
  41. package/components/pagination.scss +79 -0
  42. package/components/popover.scss +21 -0
  43. package/components/product-card.scss +74 -0
  44. package/components/progress.scss +28 -0
  45. package/components/reboot.scss +10 -0
  46. package/components/root.scss +11 -0
  47. package/components/sizing.scss +101 -0
  48. package/components/spinner.scss +71 -0
  49. package/components/stepper.scss +193 -0
  50. package/components/subnavigation.scss +138 -0
  51. package/components/tables.scss +16 -0
  52. package/components/tabs.scss +212 -0
  53. package/components/timepicker.scss +123 -0
  54. package/components/toast.scss +187 -0
  55. package/components/tooltip.scss +23 -0
  56. package/components/topic-teaser.scss +186 -0
  57. package/components/transitions.scss +4 -0
  58. package/components/type.scss +131 -0
  59. package/components/utilities.scss +98 -0
  60. package/core.css +0 -0
  61. package/core.scss +5 -0
  62. package/functions/_color.scss +55 -0
  63. package/functions/_icons.scss +71 -0
  64. package/functions/_index.scss +5 -0
  65. package/functions/_list.scss +22 -0
  66. package/functions/_sizing.scss +103 -0
  67. package/functions/_utilities.scss +66 -0
  68. package/index.css +75 -0
  69. package/index.scss +8 -0
  70. package/intranet.css +75 -0
  71. package/intranet.scss +6 -0
  72. package/layouts/portal/_grid.scss +80 -0
  73. package/layouts/portal/_subnavigation.scss +5 -0
  74. package/layouts/portal/_type.scss +83 -0
  75. package/layouts/portal/_variables.scss +8 -0
  76. package/layouts/portal/index.scss +5 -0
  77. package/lic/_bootstrap-license.scss +29 -0
  78. package/mixins/_animation.scss +48 -0
  79. package/mixins/_badge.scss +22 -0
  80. package/mixins/_button.scss +57 -0
  81. package/mixins/_color.scss +15 -0
  82. package/mixins/_form-checks.scss +80 -0
  83. package/mixins/_forms.scss +110 -0
  84. package/mixins/_icons.scss +38 -0
  85. package/mixins/_index.scss +8 -0
  86. package/mixins/_scroll-shadows.scss +17 -0
  87. package/mixins/_size.scss +65 -0
  88. package/mixins/_type.scss +54 -0
  89. package/mixins/_utilities.scss +79 -0
  90. package/package.json +76 -0
  91. package/placeholders/_button.scss +25 -0
  92. package/placeholders/_color.scss +71 -0
  93. package/placeholders/_dropdown.scss +11 -0
  94. package/placeholders/_index.scss +3 -0
  95. package/placeholders/_notifications.scss +128 -0
  96. package/placeholders/_text.scss +158 -0
  97. package/placeholders/badge.scss +61 -0
  98. package/themes/bootstrap/_accordion.scss +2 -0
  99. package/themes/bootstrap/_alert.scss +2 -0
  100. package/themes/bootstrap/_badge.scss +2 -0
  101. package/themes/bootstrap/_breadcrumbs.scss +2 -0
  102. package/themes/bootstrap/_button-group.scss +2 -0
  103. package/themes/bootstrap/_buttons.scss +3 -0
  104. package/themes/bootstrap/_card.scss +2 -0
  105. package/themes/bootstrap/_carousel.scss +2 -0
  106. package/themes/bootstrap/_close.scss +2 -0
  107. package/themes/bootstrap/_containers.scss +2 -0
  108. package/themes/bootstrap/_dropdown.scss +2 -0
  109. package/themes/bootstrap/_forms.scss +9 -0
  110. package/themes/bootstrap/_grid.scss +2 -0
  111. package/themes/bootstrap/_images.scss +2 -0
  112. package/themes/bootstrap/_list-group.scss +2 -0
  113. package/themes/bootstrap/_modal.scss +2 -0
  114. package/themes/bootstrap/_nav.scss +2 -0
  115. package/themes/bootstrap/_navbar.scss +2 -0
  116. package/themes/bootstrap/_offcanvas.scss +2 -0
  117. package/themes/bootstrap/_overrides-color.scss +45 -0
  118. package/themes/bootstrap/_overrides-features.scss +18 -0
  119. package/themes/bootstrap/_overrides-variables.scss +40 -0
  120. package/themes/bootstrap/_overrides.scss +5 -0
  121. package/themes/bootstrap/_pagination.scss +2 -0
  122. package/themes/bootstrap/_popover.scss +2 -0
  123. package/themes/bootstrap/_progress.scss +2 -0
  124. package/themes/bootstrap/_reboot.scss +2 -0
  125. package/themes/bootstrap/_root.scss +2 -0
  126. package/themes/bootstrap/_spinners.scss +2 -0
  127. package/themes/bootstrap/_tables.scss +2 -0
  128. package/themes/bootstrap/_toasts.scss +2 -0
  129. package/themes/bootstrap/_tooltip.scss +2 -0
  130. package/themes/bootstrap/_transitions.scss +2 -0
  131. package/themes/bootstrap/_type.scss +6 -0
  132. package/themes/bootstrap/_utilities.scss +9 -0
  133. package/themes/bootstrap/forms/_floating-labels.scss +2 -0
  134. package/themes/bootstrap/forms/_form-check.scss +2 -0
  135. package/themes/bootstrap/forms/_form-control.scss +2 -0
  136. package/themes/bootstrap/forms/_form-range.scss +2 -0
  137. package/themes/bootstrap/forms/_form-select.scss +2 -0
  138. package/themes/bootstrap/forms/_form-text.scss +2 -0
  139. package/themes/bootstrap/forms/_input-group.scss +2 -0
  140. package/themes/bootstrap/forms/_labels.scss +2 -0
  141. package/themes/bootstrap/forms/_validation.scss +2 -0
  142. package/variables/_animation.scss +36 -0
  143. package/variables/_breakpoints.scss +9 -0
  144. package/variables/_color.scss +119 -0
  145. package/variables/_commons.scss +56 -0
  146. package/variables/_grid.scss +27 -0
  147. package/variables/_icons.scss +4600 -0
  148. package/variables/_index.scss +14 -0
  149. package/variables/_options.scss +5 -0
  150. package/variables/_spacing.scss +181 -0
  151. package/variables/_type.scss +204 -0
  152. package/variables/components/_accordion.scss +38 -0
  153. package/variables/components/_alert.scss +51 -0
  154. package/variables/components/_badge.scss +44 -0
  155. package/variables/components/_breadcrumbs.scss +21 -0
  156. package/variables/components/_button.scss +137 -0
  157. package/variables/components/_card.scss +30 -0
  158. package/variables/components/_carousel.scss +27 -0
  159. package/variables/components/_close.scss +19 -0
  160. package/variables/components/_code.scss +14 -0
  161. package/variables/components/_datatable.scss +53 -0
  162. package/variables/components/_datepicker.scss +22 -0
  163. package/variables/components/_detail-summary.scss +12 -0
  164. package/variables/components/_dropdowns.scss +30 -0
  165. package/variables/components/_figures.scss +6 -0
  166. package/variables/components/_form-check.scss +63 -0
  167. package/variables/components/_form-feedback.scss +25 -0
  168. package/variables/components/_form-select.scss +13 -0
  169. package/variables/components/_form-switch.scss +38 -0
  170. package/variables/components/_forms.scss +129 -0
  171. package/variables/components/_index.scss +30 -0
  172. package/variables/components/_intranet-header.scss +9 -0
  173. package/variables/components/_list-group.scss +29 -0
  174. package/variables/components/_modals.scss +68 -0
  175. package/variables/components/_nav.scss +55 -0
  176. package/variables/components/_navbar.scss +44 -0
  177. package/variables/components/_pagination.scss +42 -0
  178. package/variables/components/_paragraph.scss +6 -0
  179. package/variables/components/_popovers.scss +28 -0
  180. package/variables/components/_progress-bars.scss +16 -0
  181. package/variables/components/_spinners.scss +16 -0
  182. package/variables/components/_stepper.scss +36 -0
  183. package/variables/components/_subnavigation.scss +32 -0
  184. package/variables/components/_tables.scss +39 -0
  185. package/variables/components/_thumbnails.scss +11 -0
  186. package/variables/components/_toasts.scss +18 -0
  187. package/variables/components/_tooltips.scss +18 -0
  188. package/variables/components/_topic-teaser.scss +27 -0
@@ -0,0 +1,212 @@
1
+ @forward '../variables/options';
2
+
3
+ @use '../lic/bootstrap-license';
4
+ @use '../themes/bootstrap/overrides' as *;
5
+
6
+ @use '../variables/components/nav';
7
+ @use '../variables/spacing';
8
+ @use '../variables/commons';
9
+ @use '../variables/color';
10
+ @use '../mixins/color' as color-mx;
11
+ @use '../mixins/utilities';
12
+
13
+ .tabs-wrapper {
14
+ position: relative;
15
+ padding-top: spacing.$spacer;
16
+ border: 0;
17
+ background-color: color.$gray-background-light;
18
+
19
+ // Create a line that lies below the active but above the passive elements
20
+ // This way hover works smoothly with the background color
21
+ &::after {
22
+ content: '';
23
+ position: absolute;
24
+ bottom: 0;
25
+ width: 100%;
26
+ height: 1px;
27
+ background-color: nav.$nav-tabs-border-color;
28
+ }
29
+
30
+ // Small hack to save a lot of code and provide a lot of flexibility to tabs coloring
31
+ .tabs {
32
+ background-color: transparent !important;
33
+ }
34
+
35
+ @include utilities.high-contrast-mode() {
36
+ &::after {
37
+ background-color: ButtonBorder;
38
+ }
39
+ }
40
+ }
41
+
42
+ .tabs {
43
+ flex-wrap: nowrap;
44
+ overflow-x: auto;
45
+
46
+ /* prevent scroll chaining on x scroll */
47
+ overscroll-behavior-x: contain;
48
+ white-space: nowrap;
49
+
50
+ // Scrolling fix, make the tabs scroll a little more so the right most tab is not
51
+ // flush with the window border
52
+ &::after {
53
+ content: '';
54
+ display: block;
55
+ flex: 1 0 auto;
56
+ width: nav.$nav-link-padding-x;
57
+ }
58
+
59
+ .tab-title {
60
+ position: relative;
61
+ box-sizing: border-box;
62
+ padding: nav.$nav-link-padding;
63
+ transition: background-color 100ms;
64
+ border-right: 1px solid transparent;
65
+ border-left: 1px solid transparent;
66
+ outline-color: currentColor;
67
+ opacity: 0.7;
68
+ color: var(--post-contrast-color);
69
+
70
+ &:focus {
71
+ opacity: 0.7;
72
+ background-color: unset;
73
+ color: var(--post-contrast-color);
74
+ }
75
+
76
+ &:hover {
77
+ opacity: 1;
78
+ background-color: nav.$nav-tabs-link-active-bg;
79
+ color: var(--post-contrast-color);
80
+ }
81
+
82
+ // same styles as focus, can't use placeholder here because focus-visible can't be described outside of the support condition
83
+ &:focus-visible {
84
+ outline: transparent;
85
+ opacity: 1;
86
+ background-color: nav.$nav-tabs-link-active-bg;
87
+ color: var(--post-contrast-color);
88
+
89
+ &::after {
90
+ content: '';
91
+ display: block;
92
+ position: absolute;
93
+ top: $nav-tabs-focus-box-shadow-width;
94
+ right: $nav-tabs-focus-box-shadow-width - 1px;
95
+ bottom: 0;
96
+ left: $nav-tabs-focus-box-shadow-width - 1px;
97
+ box-shadow: nav.$nav-tabs-focus-box-shadow;
98
+ }
99
+ }
100
+
101
+ &.active {
102
+ z-index: 1; // Lift above the line and make focus visible all around
103
+ border-right-color: nav.$nav-tabs-border-color;
104
+ border-left-color: nav.$nav-tabs-border-color;
105
+ opacity: 1;
106
+ background-color: nav.$nav-tabs-link-active-bg;
107
+ color: var(--post-contrast-color);
108
+ font-weight: 700;
109
+
110
+ // Create a line that does not suffer from border corner mitering
111
+ &::before {
112
+ content: '';
113
+ display: block;
114
+ position: absolute;
115
+ top: 0;
116
+ right: -1px;
117
+ left: -1px;
118
+ height: spacing.$size-micro;
119
+ background-color: nav.$nav-tabs-link-active-border-color;
120
+ }
121
+ }
122
+
123
+ @include utilities.high-contrast-mode() {
124
+ opacity: 1;
125
+ border-left-color: Canvas;
126
+ border-right-color: Canvas;
127
+ color: LinkText;
128
+
129
+ &:hover,
130
+ &:focus,
131
+ &:focus-within,
132
+ &:focus-visible {
133
+ outline: spacing.$size-line solid Highlight;
134
+ outline-offset: -(spacing.$size-micro);
135
+ }
136
+
137
+ &.active {
138
+ border-left-color: ButtonText;
139
+ border-right-color: ButtonText;
140
+ color: Highlight;
141
+
142
+ &::before {
143
+ background-color: Highlight;
144
+ }
145
+ }
146
+ }
147
+ }
148
+
149
+ // Tabs with dark backgrounds
150
+ @include color-mx.on-dark-background(true) {
151
+ .tab-title {
152
+ &:hover {
153
+ background-color: rgba(nav.$nav-tabs-link-active-bg, 0.2);
154
+ }
155
+
156
+ &:focus-visible {
157
+ background-color: rgba(nav.$nav-tabs-link-active-bg, 0.2);
158
+ }
159
+ }
160
+ }
161
+ }
162
+
163
+ .tab-content {
164
+ padding-top: spacing.$spacer;
165
+ padding-bottom: spacing.$spacer;
166
+ }
167
+
168
+ // Careful, this generates a lot of code
169
+ @each $key, $color in color.$background-colors {
170
+ .bg-#{$key} {
171
+ .tabs-wrapper {
172
+ background-color: $color;
173
+ }
174
+
175
+ .tab-title {
176
+ background-color: $color;
177
+
178
+ &.active {
179
+ background-color: $color;
180
+ }
181
+ }
182
+
183
+ .nav-item {
184
+ background-color: $color;
185
+ }
186
+ }
187
+ }
188
+
189
+ [class*='bg-'] .tab-title.active {
190
+ &:focus {
191
+ &::after {
192
+ background-color: rgba(255, 255, 255, 0.2);
193
+ }
194
+ }
195
+
196
+ // write supports for selectors this way: https://stackoverflow.com/a/62666132
197
+ // need to include * otherwise it throws build error
198
+ @supports #{'\selector(*:focus-visible)'} {
199
+ &:focus {
200
+ &::after {
201
+ background-color: unset;
202
+ }
203
+ }
204
+
205
+ // same styles as focus, can't use placeholder here because focus-visible can't be described outside of the support condition
206
+ &:focus-visible {
207
+ &::after {
208
+ background-color: rgba(255, 255, 255, 0.2);
209
+ }
210
+ }
211
+ }
212
+ }
@@ -0,0 +1,123 @@
1
+ @forward '../variables/options';
2
+
3
+ @use 'sass:map';
4
+
5
+ @use '../mixins/utilities';
6
+ @use '../mixins/icons' as icon-mixins;
7
+ @use '../mixins/forms' as form-mixins;
8
+ @use '../mixins/button' as button-mixins;
9
+
10
+ @use '../variables/color';
11
+ @use '../variables/components/forms';
12
+ @use '../variables/components/button';
13
+
14
+ // Basic timepicker overrides
15
+ .ngb-tp {
16
+ .ngb-tp-input-container {
17
+ width: auto;
18
+ }
19
+
20
+ .form-control {
21
+ width: 4.5rem;
22
+ }
23
+
24
+ .form-control-sm,
25
+ .form-control-rg {
26
+ width: 4rem;
27
+ }
28
+
29
+ .form-control-lg {
30
+ width: 6rem;
31
+ padding: 1rem 1.375rem;
32
+ @include form-mixins.placeholder {
33
+ color: forms.$input-placeholder-color;
34
+ }
35
+ }
36
+
37
+ .ngb-tp-chevron {
38
+ &::before {
39
+ @include icon-mixins.pi('2051');
40
+ width: map.get(button.$btn-icon-size-map, 'md');
41
+ height: map.get(button.$btn-icon-size-map, 'md');
42
+ transform: none;
43
+ border: 0;
44
+ background-repeat: no-repeat;
45
+ background-position: center center;
46
+ background-size: contain;
47
+ }
48
+
49
+ &.bottom::before {
50
+ transform: rotateZ(180deg);
51
+ }
52
+ }
53
+
54
+ @each $size in sm, lg {
55
+ .btn-#{$size} .ngb-tp-chevron::before {
56
+ width: map.get(button.$btn-icon-size-map, $size);
57
+ height: map.get(button.$btn-icon-size-map, $size);
58
+ }
59
+ }
60
+
61
+ @include utilities.high-contrast-mode() {
62
+ .form-control {
63
+ &:hover,
64
+ &:focus-visible {
65
+ border-color: Highlight;
66
+ }
67
+ }
68
+ }
69
+ }
70
+
71
+ // Regular-sized timepicker
72
+ .timepicker-rg {
73
+ .btn {
74
+ @include button-mixins.button-size(rg);
75
+
76
+ .ngb-tp-chevron::before {
77
+ width: map.get(button.$btn-icon-size-map, 'rg');
78
+ height: map.get(button.$btn-icon-size-map, 'rg');
79
+ }
80
+ }
81
+
82
+ .form-control {
83
+ @include form-mixins.form-control-rg;
84
+ }
85
+ }
86
+
87
+ // Timepicker validation
88
+ ngb-timepicker {
89
+ &.ng-invalid {
90
+ .form-control {
91
+ border-color: color.$error;
92
+
93
+ &:focus {
94
+ border-color: color.$error;
95
+ box-shadow: 0 0 0 forms.$input-focus-width rgba(color.$error, 0.25);
96
+ }
97
+ }
98
+
99
+ ~ .invalid-feedback,
100
+ ~ .invalid-tooltip {
101
+ display: block;
102
+ }
103
+ }
104
+
105
+ &.ng-valid {
106
+ ~ .valid-feedback,
107
+ ~ .valid-tooltip {
108
+ display: block;
109
+ }
110
+ }
111
+
112
+ @include utilities.high-contrast-mode() {
113
+ &.ng-invalid,
114
+ &.ng-valid {
115
+ .form-control {
116
+ &:hover,
117
+ &:focus-visible {
118
+ border-color: Highlight;
119
+ }
120
+ }
121
+ }
122
+ }
123
+ }
@@ -0,0 +1,187 @@
1
+ @forward '../variables/options';
2
+
3
+ @use '../lic/bootstrap-license';
4
+ @use '../themes/bootstrap/overrides' as *;
5
+
6
+ @use '../variables/components/toasts';
7
+ @use '../variables/components/alert';
8
+ @use '../components/close';
9
+ @use '../functions/color' as color-fn;
10
+ @use '../placeholders/color' as color-ph;
11
+ @use '../placeholders/notifications';
12
+
13
+ // Positioning
14
+ .toast-top-center,
15
+ .toast-top-full-width,
16
+ .toast-top-left,
17
+ .toast-top-right {
18
+ top: alert.$alert-margin;
19
+ }
20
+
21
+ .toast-bottom-center,
22
+ .toast-bottom-full-width,
23
+ .toast-bottom-right,
24
+ .toast-bottom-left {
25
+ bottom: alert.$alert-margin;
26
+ }
27
+
28
+ .toast-top-left,
29
+ .toast-bottom-left,
30
+ .toast-top-full-width,
31
+ .toast-bottom-full-width,
32
+ .toast-center-left {
33
+ left: alert.$alert-margin;
34
+ }
35
+
36
+ .toast-top-right,
37
+ .toast-bottom-right,
38
+ .toast-top-full-width,
39
+ .toast-bottom-full-width,
40
+ .toast-center-right {
41
+ right: alert.$alert-margin;
42
+ }
43
+
44
+ .toast-top-center,
45
+ .toast-bottom-center {
46
+ left: 50%;
47
+ transform: translateX(-50%);
48
+ }
49
+
50
+ .toast-center-left,
51
+ .toast-center-right {
52
+ top: 50%;
53
+ transform: translateY(-50%);
54
+ }
55
+
56
+ .toast-center-center {
57
+ top: 50%;
58
+ left: 50%;
59
+ transform: translate(-50%, -50%);
60
+ }
61
+
62
+ .toast-top-full-width,
63
+ .toast-bottom-full-width {
64
+ .toast {
65
+ width: 100% !important;
66
+ }
67
+ }
68
+
69
+ // Base styling
70
+ .toast-container {
71
+ @extend %notification-container;
72
+ position: fixed;
73
+ pointer-events: none;
74
+
75
+ * {
76
+ box-sizing: border-box;
77
+ }
78
+ }
79
+
80
+ .toast {
81
+ $effective-line-height: (alert.$alert-line-height * alert.$alert-font-size-small);
82
+
83
+ @extend %notification;
84
+
85
+ display: flex !important; // Needs to be important to override display styling by the ngx-toaster
86
+ width: alert.$alert-toast-width;
87
+
88
+ min-height: 2 * alert.$alert-toast-padding-y + 2 * $effective-line-height;
89
+
90
+ padding: alert.$alert-toast-padding-y alert.$alert-toast-padding-x;
91
+ padding-left: (alert.$alert-toast-padding-x * 2 + alert.$alert-toast-icon-size);
92
+
93
+ overflow: hidden;
94
+ background-position: alert.$alert-toast-padding-x center;
95
+
96
+ background-size: alert.$alert-toast-icon-size;
97
+ font-size: alert.$alert-font-size-small;
98
+ pointer-events: auto;
99
+
100
+ &.no-icon {
101
+ padding-left: alert.$alert-toast-padding-x;
102
+ }
103
+
104
+ &:hover {
105
+ opacity: 1;
106
+ box-shadow: alert.$alert-toast-box-shadow-hover;
107
+ cursor: pointer;
108
+ }
109
+
110
+ .toast-close-button {
111
+ @extend %notification-close;
112
+
113
+ padding: alert.$alert-toast-padding-y alert.$alert-toast-padding-x;
114
+ }
115
+ }
116
+
117
+ .toast-title {
118
+ @extend %notification-title;
119
+
120
+ font-size: alert.$alert-font-size-small;
121
+ }
122
+
123
+ .toast-message {
124
+ font-size: alert.$alert-font-size-small;
125
+ word-wrap: break-word;
126
+
127
+ a:hover {
128
+ text-decoration: none;
129
+ }
130
+ }
131
+
132
+ /* stylelint-disable */
133
+ .toast-close-button {
134
+ @extend .btn-close;
135
+ }
136
+ /* stylelint-enable */
137
+
138
+ .toast {
139
+ .toast-close-button,
140
+ .btn-close {
141
+ ~ .toast-message,
142
+ ~ .toast-title {
143
+ padding-right: calc(#{alert.$alert-toast-padding-x} + #{alert.$alert-close-icon-size});
144
+ }
145
+
146
+ + .toast-message {
147
+ font-weight: bold;
148
+ }
149
+ }
150
+ }
151
+
152
+ // Variants
153
+
154
+ @each $name, $color, $icon in alert.$alert-list {
155
+ .toast-#{$name} {
156
+ --post-bg-rgb: #{color-fn.rgb-values($color)};
157
+ @extend %notification-#{$name};
158
+
159
+ @if (color-fn.get-contrast-color($color) != #000) {
160
+ @extend %color-background-dark-variables;
161
+ } @else {
162
+ @extend %color-background-light-variables;
163
+ }
164
+
165
+ .toast-close-button,
166
+ .btn-close {
167
+ @extend %notification-#{$name}-close;
168
+ }
169
+ }
170
+ }
171
+
172
+ // Responsive Design
173
+ @include media-breakpoint-down(md) {
174
+ .toast-container .toast {
175
+ width: alert.$alert-toast-width-small-breakpoint;
176
+ }
177
+ }
178
+ @include media-breakpoint-down(sm) {
179
+ .toast-container {
180
+ right: alert.$alert-margin;
181
+ left: alert.$alert-margin;
182
+
183
+ .toast {
184
+ width: 100%;
185
+ }
186
+ }
187
+ }
@@ -0,0 +1,23 @@
1
+ @forward '../variables/options';
2
+
3
+ @use '../lic/bootstrap-license';
4
+ @use '../themes/bootstrap/tooltip' as bt;
5
+
6
+ // There's a 1px-gap between the arrow and the tooltip-body.
7
+ // We can fix that by moving the arrow to the opposite direction, according to the tooltip-positioning (position top -> move direction bottom etc)
8
+
9
+ .bs-tooltip-top .arrow {
10
+ bottom: 1px;
11
+ }
12
+
13
+ .bs-tooltip-right .arrow {
14
+ left: 1px;
15
+ }
16
+
17
+ .bs-tooltip-bottom .arrow {
18
+ top: 1px;
19
+ }
20
+
21
+ .bs-tooltip-left .arrow {
22
+ right: 1px;
23
+ }