@db-ux/core-components 4.14.0 → 5.0.1

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 (62) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/build/components/accordion-item/accordion-item.css +0 -1
  3. package/build/components/brand/brand.css +0 -1
  4. package/build/components/brand/brand.scss +0 -1
  5. package/build/components/button/button.css +4 -9
  6. package/build/components/checkbox/checkbox.css +0 -3
  7. package/build/components/checkbox/checkbox.scss +0 -2
  8. package/build/components/custom-button/custom-button.css +8 -13
  9. package/build/components/custom-button/custom-button.scss +2 -3
  10. package/build/components/custom-select/custom-select.css +0 -1
  11. package/build/components/custom-select-list-item/custom-select-list-item.css +6 -2
  12. package/build/components/custom-select-list-item/custom-select-list-item.scss +8 -3
  13. package/build/components/drawer/drawer.css +94 -166
  14. package/build/components/drawer/drawer.scss +160 -176
  15. package/build/components/drawer-footer/drawer-footer.css +34 -0
  16. package/build/components/drawer-footer/drawer-footer.scss +11 -0
  17. package/build/components/drawer-header/drawer-header.css +38 -0
  18. package/build/components/drawer-header/drawer-header.scss +17 -0
  19. package/build/components/header/header.css +50 -40
  20. package/build/components/header/header.scss +35 -21
  21. package/build/components/icon/icon.css +0 -6
  22. package/build/components/infotext/infotext.css +0 -4
  23. package/build/components/infotext/infotext.scss +0 -2
  24. package/build/components/input/input.css +0 -5
  25. package/build/components/link/link.css +5 -5
  26. package/build/components/link/link.scss +8 -3
  27. package/build/components/navigation/navigation.css +1 -2
  28. package/build/components/navigation/navigation.scss +2 -2
  29. package/build/components/navigation-item/navigation-item.css +15 -27
  30. package/build/components/navigation-item/navigation-item.scss +17 -21
  31. package/build/components/notification/notification.css +0 -1
  32. package/build/components/notification/notification.scss +0 -2
  33. package/build/components/select/select.css +6 -1
  34. package/build/components/select/select.scss +7 -0
  35. package/build/components/switch/switch.css +0 -3
  36. package/build/components/switch/switch.scss +0 -1
  37. package/build/components/tab-item/tab-item.css +120 -98
  38. package/build/components/tab-item/tab-item.scss +89 -90
  39. package/build/components/tab-list/tab-list.css +38 -36
  40. package/build/components/tab-list/tab-list.scss +11 -9
  41. package/build/components/tab-panel/tab-panel.css +30 -4
  42. package/build/components/tab-panel/tab-panel.scss +60 -2
  43. package/build/components/table/table.css +0 -4
  44. package/build/components/table-row/table-row.css +0 -4
  45. package/build/components/table-row/table-row.scss +0 -5
  46. package/build/components/tabs/tabs.css +152 -263
  47. package/build/components/tabs/tabs.scss +243 -198
  48. package/build/components/tag/tag.css +2 -21
  49. package/build/components/tag/tag.scss +5 -7
  50. package/build/styles/absolute.css +11 -11
  51. package/build/styles/bundle.css +11 -11
  52. package/build/styles/index.css +10 -10
  53. package/build/styles/index.scss +3 -1
  54. package/build/styles/internal/_button-components.scss +7 -4
  55. package/build/styles/internal/_component.scss +4 -0
  56. package/build/styles/internal/_custom-elements.scss +3 -2
  57. package/build/styles/internal/_icon-passing.scss +9 -10
  58. package/build/styles/relative.css +11 -11
  59. package/build/styles/rollup.css +11 -11
  60. package/build/styles/wc-workarounds.css +1 -1
  61. package/build/styles/webpack.css +11 -11
  62. package/package.json +6 -6
@@ -2,40 +2,32 @@
2
2
  @use "@db-ux/core-foundations/build/styles/colors";
3
3
  @use "../../styles/internal/form-components";
4
4
  @use "../../styles/internal/indicator";
5
- @use "../../styles/internal/scrollbar";
6
5
  @use "@db-ux/core-foundations/build/styles/helpers";
7
6
 
8
- $max-tabs: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
7
+ $indicator-gap-offset: calc(
8
+ #{variables.$db-border-width-xs} + #{variables.$db-spacing-fixed-2xs}
9
+ );
9
10
 
10
- %angular-workaround {
11
- db-tab-list,
12
- dbtablist {
13
- @each $index in $max-tabs {
14
- &:has([id$="-tab-#{$index}"]:checked) {
15
- ~ dbtabpanel > [id$="-tab-panel-#{$index}"],
16
- ~ db-tab-panel > [id$="-tab-panel-#{$index}"] {
17
- @include helpers.display(block);
18
- }
19
- }
20
- }
21
- }
22
- }
11
+ // Space the focus outline needs outside the tab box: outline-offset + outline width.
12
+ $focus-outline-reach: calc(
13
+ #{variables.$db-border-width-xs} + #{variables.$db-border-width-2xs}
14
+ );
23
15
 
24
16
  %horizontal-indicator {
25
17
  .db-tab-item {
26
18
  @include indicator.set-indicator-horizontal;
27
19
 
28
- &:has(input:checked) {
20
+ &::after {
21
+ inset-block-end: calc(
22
+ -1 * #{$indicator-gap-offset}
23
+ ) !important; // overrides inset-block shorthand set in _indicator.scss
24
+ }
25
+
26
+ &[aria-selected="true"] {
29
27
  @include indicator.show-indicator-horizontal;
30
28
 
31
29
  &::after {
32
- inset-block-end: calc(
33
- -1 *
34
- (
35
- #{variables.$db-spacing-fixed-2xs} +
36
- #{variables.$db-border-width-xs}
37
- )
38
- );
30
+ inline-size: 100%;
39
31
  }
40
32
  }
41
33
  }
@@ -46,12 +38,16 @@ $max-tabs: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
46
38
  @include indicator.set-indicator-vertical;
47
39
 
48
40
  &::after {
49
- inset-inline-start: 0;
50
- z-index: -2;
41
+ inset-inline: calc(-1 * var(--db-tabs-line-gap-vertical, 0px)) auto;
42
+ z-index: 5;
51
43
  }
52
44
 
53
- &:has(input:checked) {
45
+ &[aria-selected="true"] {
54
46
  @include indicator.show-indicator-vertical;
47
+
48
+ &::after {
49
+ block-size: 100%;
50
+ }
55
51
  }
56
52
  }
57
53
  }
@@ -66,254 +62,303 @@ $max-tabs: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
66
62
  .db-tabs {
67
63
  $db-tabs-z-index-tab-list: 20;
68
64
 
69
- @extend %angular-workaround;
70
65
  @include helpers.display(flex);
71
66
 
72
67
  inline-size: 100%;
73
68
  position: relative;
74
69
 
75
- .db-tab-panel {
76
- padding: 0 variables.$db-spacing-fixed-xs;
77
- }
78
-
79
70
  .db-tab-list {
80
- max-inline-size: 100%;
71
+ position: relative;
81
72
  z-index: $db-tabs-z-index-tab-list;
82
73
 
83
- @each $index in $max-tabs {
84
- &:has([id$="-tab-#{$index}"]:checked)
85
- ~ [id$="-tab-panel-#{$index}"] {
86
- @include helpers.display(block);
87
- }
74
+ db-tab-item,
75
+ dbtabitem {
76
+ display: contents;
88
77
  }
89
78
  }
90
79
 
91
- .db-tab-item {
92
- @extend %indicator;
93
- }
94
-
95
- /*
96
- Variant Orientation HORIZONTAL
97
- */
98
80
  &:not([data-orientation="vertical"]) {
99
81
  flex-flow: column wrap;
100
82
 
101
- .db-tab-panel {
102
- inline-size: 100%;
103
- }
104
-
105
83
  .db-tab-list {
106
- /* horizontal track for indicator */
107
- &::before {
108
- @extend %indicator-track;
109
-
110
- block-size: variables.$db-border-width-xs;
111
- inset-inline: variables.$db-spacing-fixed-xs;
112
-
113
- /* top position equals sum of: margin xs + padding xs + line-height + padding xs + margin 2xs */
114
- inset-block-start: calc(
115
- 3 * #{variables.$db-spacing-fixed-xs} +
116
- #{variables.$db-spacing-fixed-2xs} +
117
- #{form-components.$font-size-height}
118
- );
119
- }
120
-
121
- > ul {
122
- @extend %horizontal-indicator;
123
-
124
- overflow: auto hidden;
125
- inline-size: 100%;
84
+ padding: variables.$db-spacing-fixed-xs
85
+ variables.$db-spacing-fixed-xs 0 variables.$db-spacing-fixed-xs;
126
86
 
127
- .db-tab-item {
128
- margin-block: variables.$db-spacing-fixed-xs
129
- calc(
130
- 2 * #{variables.$db-spacing-fixed-2xs} +
131
- #{variables.$db-border-width-xs}
132
- );
133
- }
87
+ @extend %horizontal-indicator;
134
88
 
135
- db-tab-item,
136
- dbtabitem {
137
- &:first-of-type {
138
- .db-tab-item {
139
- margin-inline-start: variables.$db-spacing-fixed-xs;
140
- }
141
- }
89
+ background-image: linear-gradient(
90
+ colors.$db-adaptive-bg-basic-transparent-semi-default,
91
+ colors.$db-adaptive-bg-basic-transparent-semi-default
92
+ );
93
+ background-position: left bottom;
94
+ background-repeat: no-repeat;
142
95
 
143
- &:last-of-type {
144
- .db-tab-item {
145
- margin-inline-end: variables.$db-spacing-fixed-xs;
146
- }
147
- }
148
- }
96
+ // Draw baseline flush with the first and last tab-item (content-box excludes padding).
97
+ background-origin: content-box;
98
+ background-size: 100% variables.$db-border-width-xs;
149
99
 
150
- &:not(:has(db-tab-item, dbtabitem)) {
151
- .db-tab-item {
152
- &:first-of-type {
153
- margin-inline-start: variables.$db-spacing-fixed-xs;
154
- }
100
+ .db-tab-item {
101
+ // stylelint-disable-next-line db-ux/use-spacings
102
+ margin-block-end: $indicator-gap-offset;
103
+ }
155
104
 
156
- &:last-of-type {
157
- margin-inline-end: variables.$db-spacing-fixed-xs;
158
- }
159
- }
160
- }
105
+ &[role="tablist"],
106
+ .db-tab-list {
107
+ display: flex;
108
+ align-items: stretch;
109
+ overflow: auto;
110
+ inline-size: 100%;
161
111
  }
162
112
  }
163
113
  }
164
114
 
165
- /*
166
- Variant Orientation VERTICAL
167
- */
168
115
  &[data-orientation="vertical"] {
169
116
  flex-direction: row;
170
117
 
171
- .db-tab-panel {
172
- padding: variables.$db-spacing-fixed-xs 0;
173
- }
174
-
175
118
  .db-tab-list {
176
- $width: var(
177
- --db-tab-list-vertical-width,
178
- #{variables.$db-sizing-3xl}
179
- );
119
+ --db-tabs-line-gap-vertical: #{$indicator-gap-offset};
180
120
 
181
121
  /*
182
122
  min and nominal size must both be set to ensure
183
123
  - min-inline-size: tab-list is not displayed narrower than defined
184
124
  - max-inline-size: tab-list is not displayed wider than defined
185
125
  */
186
- /* stylelint-disable-next-line db-ux/use-sizing */
187
- min-inline-size: $width;
188
- /* stylelint-disable-next-line db-ux/use-sizing */
189
- max-inline-size: $width;
190
-
191
- /* horizontal space to the tab panels */
192
- padding-inline-end: variables.$db-spacing-fixed-xs;
193
-
194
- /* ensures that tab-list (track) is only as high as all the tab-items together if open tab-panel is higher */
126
+ min-inline-size: variables.$db-sizing-3xl;
127
+ max-inline-size: variables.$db-sizing-3xl;
128
+ // stylelint-disable-next-line db-ux/use-spacings
129
+ padding-inline: variables.$db-spacing-fixed-xs
130
+ var(--db-tabs-line-gap-vertical);
195
131
  margin-block-end: auto;
196
132
 
197
- .db-tab-item {
198
- label {
199
- position: relative;
200
- }
201
-
202
- &:has(input:focus-visible),
203
- &:hover {
204
- inline-size: fit-content;
205
-
206
- label {
207
- overflow: visible;
208
- }
209
- }
210
- }
133
+ @extend %vertical-indicator;
211
134
 
212
- /* vertical track for indicator */
213
135
  &::before {
214
136
  @extend %indicator-track;
215
137
 
216
- inline-size: variables.$db-border-width-xs;
217
- inset-block: variables.$db-spacing-fixed-xs;
138
+ display: block;
218
139
  inset-inline-start: 0;
140
+ inset-block: 0;
141
+ inline-size: variables.$db-border-width-xs;
142
+ z-index: 1;
219
143
  }
220
144
 
221
- > ul {
222
- @extend %vertical-indicator;
223
-
145
+ &[role="tablist"],
146
+ .db-tab-list {
147
+ display: flex;
224
148
  flex-direction: column;
225
- block-size: 100%;
149
+ align-items: flex-start;
150
+ }
226
151
 
227
- &:not(:has(db-tab-item, dbtabitem)) {
228
- .db-tab-item {
229
- &:first-of-type {
230
- margin-block-start: variables.$db-spacing-fixed-xs;
231
- }
152
+ .db-tab-item-label {
153
+ inline-size: 100%;
154
+ }
232
155
 
233
- &:last-of-type {
234
- margin-block-end: variables.$db-spacing-fixed-xs;
235
- }
236
- }
237
- }
156
+ .db-tab-item-label-end-slot {
157
+ margin-inline-start: auto;
238
158
  }
239
159
  }
160
+ }
240
161
 
241
- .db-tab-item {
242
- $padding-start-calc: calc(
243
- #{variables.$db-border-width-xs} +
244
- #{variables.$db-spacing-fixed-2xs}
245
- );
162
+ &[data-tab-item-width="full"] {
163
+ .db-tab-list {
164
+ inline-size: 100%;
165
+ }
246
166
 
247
- padding-inline-start: $padding-start-calc;
167
+ &:not([data-orientation="vertical"]) .db-tab-item {
168
+ flex: 1 0 0;
169
+ inline-size: 0;
170
+ max-inline-size: none;
171
+ justify-content: flex-start;
172
+ }
248
173
 
249
- input {
250
- padding-inline-start: $padding-start-calc;
251
- }
174
+ &[data-tab-item-alignment="center"] .db-tab-item {
175
+ text-align: center;
176
+ justify-content: center;
252
177
  }
253
178
 
254
- db-tab-item,
255
- dbtabitem {
256
- &:first-of-type {
257
- .db-tab-item {
258
- margin-block-start: variables.$db-spacing-fixed-xs;
259
- }
179
+ &[data-tab-item-alignment="end"] .db-tab-item {
180
+ text-align: end;
181
+ justify-content: end;
182
+ }
183
+ }
184
+
185
+ &[data-scroll-behavior="scrollbar"] {
186
+ $db-tabs-z-index-track: 19;
187
+
188
+ &:not([data-orientation="vertical"]) {
189
+ // Keep the track outside the scrolling tab-list so the native scrollbar cannot cover it.
190
+ &::before {
191
+ content: "";
192
+ position: absolute;
193
+ z-index: $db-tabs-z-index-track;
194
+ inset-block-start: calc(
195
+ #{variables.$db-sizing-md} +
196
+ #{variables.$db-spacing-fixed-xs} +
197
+ #{variables.$db-border-width-xs}
198
+ );
199
+ inset-inline: variables.$db-spacing-fixed-xs;
200
+ block-size: variables.$db-border-width-xs;
201
+ background-color: colors.$db-adaptive-bg-basic-transparent-semi-default;
202
+ pointer-events: none;
260
203
  }
261
204
 
262
- &:last-of-type {
263
- .db-tab-item {
264
- margin-block-end: variables.$db-spacing-fixed-xs;
205
+ [data-density="functional"] &::before {
206
+ inset-block-start: calc(
207
+ #{variables.$db-sizing-sm} +
208
+ #{variables.$db-spacing-fixed-xs} +
209
+ #{variables.$db-border-width-xs}
210
+ );
211
+ }
212
+
213
+ [data-density="expressive"] &::before {
214
+ inset-block-start: calc(
215
+ #{variables.$db-sizing-lg} +
216
+ #{variables.$db-spacing-fixed-xs} +
217
+ #{variables.$db-border-width-xs}
218
+ );
219
+ }
220
+
221
+ .db-tab-list {
222
+ background-image: none;
223
+
224
+ &::before {
225
+ content: none;
265
226
  }
266
227
  }
267
228
  }
268
229
  }
269
230
 
270
- &[data-width="full"] {
231
+ &[data-scroll-behavior="arrows"] {
232
+ $db-tabs-z-index-button-background: 21;
233
+ $db-tabs-z-index-button: 22;
234
+ $db-tabs-z-index-track: 19;
235
+
271
236
  .db-tab-list {
272
- inline-size: 100%;
237
+ scrollbar-width: none;
273
238
  }
274
239
 
275
- .db-tab-item,
276
- .db-tab-item label {
277
- inline-size: 100%;
278
- }
240
+ &:not([data-orientation="vertical"]) {
241
+ // Track für Arrow-Buttons-Modus als ::before Pseudo-Element auf .db-tabs
242
+ &::before {
243
+ content: "";
244
+ position: absolute;
245
+ z-index: $db-tabs-z-index-track;
246
+ inset-block-start: calc(
247
+ #{variables.$db-sizing-md} +
248
+ #{variables.$db-border-width-2xs}
249
+ );
250
+ inset-inline: 0;
251
+ block-size: variables.$db-border-width-xs;
252
+ background-color: colors.$db-adaptive-bg-basic-transparent-semi-default;
253
+ }
279
254
 
280
- &[data-alignment="center"] {
281
- .db-tab-item label {
282
- text-align: center;
283
- justify-content: center;
255
+ [data-density="functional"] &::before {
256
+ inset-block-start: calc(
257
+ #{variables.$db-sizing-sm} +
258
+ #{variables.$db-border-width-2xs}
259
+ );
284
260
  }
285
- }
286
- }
287
261
 
288
- &[data-scroll-behavior="arrows"] {
289
- @include scrollbar.set-overflow-scroll-buttons;
262
+ [data-density="expressive"] &::before {
263
+ inset-block-start: calc(
264
+ #{variables.$db-sizing-lg} +
265
+ #{variables.$db-border-width-2xs}
266
+ );
267
+ }
290
268
 
291
- .db-tab-list {
292
- > ul {
293
- @supports (scrollbar-width: none) {
294
- scrollbar-width: none;
269
+ .db-tab-list {
270
+ // Reserve room for the focus outline (outline-offset + width) at the
271
+ // top so it isn't clipped by overflow:auto, and compensate with a
272
+ // negative margin so tabs/track/buttons stay visually in place.
273
+ // stylelint-disable-next-line db-ux/use-spacings
274
+ padding: $focus-outline-reach 0 $indicator-gap-offset;
275
+ // stylelint-disable-next-line db-ux/use-spacings
276
+ margin-block-start: calc(-1 * #{$focus-outline-reach});
277
+ background-image: none;
278
+
279
+ &::before {
280
+ content: none;
295
281
  }
296
282
 
297
- &::-webkit-scrollbar {
298
- display: none;
283
+ .db-tab-item {
284
+ margin-block-end: 0;
285
+
286
+ &::after {
287
+ inset-block-end: calc(
288
+ -1 *
289
+ (
290
+ #{variables.$db-spacing-fixed-xs} -
291
+ #{variables.$db-border-width-2xs}
292
+ )
293
+ ) !important;
294
+ }
299
295
  }
300
296
  }
301
- }
302
297
 
303
- &:has(.overflow-scroll-left-button) {
304
- &::before {
305
- content: "";
298
+ .tabs-scroll-start,
299
+ .tabs-scroll-end {
300
+ position: absolute;
301
+ z-index: $db-tabs-z-index-button;
302
+ inset-block-start: 0;
303
+ aspect-ratio: unset;
304
+ min-block-size: unset;
305
+ border-block-width: 0;
306
+ padding-block: variables.$db-spacing-fixed-xs
307
+ calc(
308
+ #{variables.$db-spacing-fixed-xs} +
309
+ #{$indicator-gap-offset}
310
+ );
311
+ align-items: flex-start;
312
+ background-color: colors.$db-adaptive-bg-basic-level-1-default;
313
+
314
+ @include helpers.hover {
315
+ background-color: colors.$db-adaptive-bg-basic-level-1-hovered;
316
+ }
317
+
318
+ @include helpers.active {
319
+ background-color: colors.$db-adaptive-bg-basic-level-1-pressed;
320
+ }
321
+
322
+ @media screen and (forced-colors: active) {
323
+ border-block: variables.$db-border-width-xs solid
324
+ transparent;
325
+ inset-block-start: calc(
326
+ -1 * #{variables.$db-border-width-xs}
327
+ );
328
+ }
329
+
330
+ [data-density="functional"] & {
331
+ padding-block: variables.$db-spacing-fixed-2xs
332
+ calc(
333
+ #{variables.$db-spacing-fixed-2xs} +
334
+ #{$indicator-gap-offset}
335
+ );
336
+ }
337
+
338
+ [data-density="expressive"] & {
339
+ padding-block: variables.$db-spacing-fixed-sm
340
+ calc(
341
+ #{variables.$db-spacing-fixed-sm} +
342
+ #{$indicator-gap-offset}
343
+ );
344
+ }
306
345
  }
307
- }
308
346
 
309
- &:has(.overflow-scroll-right-button) {
310
- &::after {
311
- content: "";
347
+ .tabs-scroll-start {
348
+ inset-inline-start: 0;
349
+
350
+ &:dir(rtl) {
351
+ --db-icon: "chevron_right";
352
+ }
312
353
  }
313
- }
314
354
 
315
- &:has(.db-button) {
316
- @include scrollbar.set-overflow-scroll-button-backgrounds;
355
+ .tabs-scroll-end {
356
+ inset-inline-end: 0;
357
+
358
+ &:dir(rtl) {
359
+ --db-icon: "chevron_left";
360
+ }
361
+ }
317
362
  }
318
363
  }
319
364
  }
@@ -954,24 +954,12 @@
954
954
  [data-no-text=true].db-tag {
955
955
  --icon-margin-after: 0;
956
956
  font-size: 0 !important;
957
- }
958
- [data-no-text=true].db-tag::before {
959
- --db-icon-margin-end: 0;
960
- }
961
- [data-no-text=true].db-tag {
962
- /* stylelint-disable-next-line at-rule-empty-line-before */
963
957
  padding: 0;
964
958
  gap: 0;
965
959
  }
966
960
  [data-no-text=true].db-tag label {
967
961
  font-size: 0 !important;
968
962
  }
969
- [data-no-text=true].db-tag label::before {
970
- --db-icon-margin-end: 0;
971
- }
972
- [data-no-text=true].db-tag label {
973
- /* stylelint-disable-next-line at-rule-empty-line-before */
974
- }
975
963
  .db-tag:not([data-no-text=true]) {
976
964
  padding-inline: var(--db-spacing-fixed-2xs);
977
965
  }
@@ -984,7 +972,6 @@
984
972
  }
985
973
 
986
974
  .db-tag {
987
- --db-icon-margin-end: 0;
988
975
  padding-block: 0;
989
976
  block-size: var(--db-sizing-sm);
990
977
  min-inline-size: var(--db-sizing-sm);
@@ -1112,9 +1099,6 @@
1112
1099
  .db-tag:not(:has(label, button:not(.db-tab-remove-button), a))[data-semantic=informational][data-emphasis=strong]::before, .db-tag:not(:has(label, button:not(.db-tab-remove-button), a))[data-semantic=informational][data-emphasis=strong]::after, .db-tag:has(.db-tab-remove-button)[data-semantic=informational][data-emphasis=strong]::before, .db-tag:has(.db-tab-remove-button)[data-semantic=informational][data-emphasis=strong]::after {
1113
1100
  --db-icon-color: var(--db-informational-on-bg-vibrant-default);
1114
1101
  }
1115
- .db-tag:has(label, button:not(.db-tab-remove-button), a) {
1116
- --db-icon-margin-end: var(--db-spacing-fixed-2xs);
1117
- }
1118
1102
  .db-tag:has(label, button:not(.db-tab-remove-button), a)[data-icon-leading]:not([data-show-icon-leading=false])::before, .db-tag:has(label, button:not(.db-tab-remove-button), a)[data-icon]:not([data-show-icon=false])::before {
1119
1103
  position: absolute;
1120
1104
  inset-block-start: var(--db-icon-passing-inset-block-start, calc(50% - 0.5em));
@@ -1126,7 +1110,7 @@
1126
1110
  .db-tag:has(label, button:not(.db-tab-remove-button), a)[data-icon-leading]:not([data-show-icon-leading=false]) > * > :is(label, button, a), .db-tag:has(label, button:not(.db-tab-remove-button), a)[data-icon]:not([data-show-icon=false]) > :is(label, button, a),
1127
1111
  .db-tag:has(label, button:not(.db-tab-remove-button), a)[data-icon]:not([data-show-icon=false]) > * > :is(label, button, a) {
1128
1112
  /* stylelint-disable-next-line db-ux/use-spacings */
1129
- padding-inline-start: var(--db-icon-passing-padding-inline-start, calc(var(--db-spacing-fixed-2xs) + var(--db-icon-margin-end, var(--db-spacing-fixed-xs)) + var(--db-icon-font-size)));
1113
+ padding-inline-start: var(--db-icon-passing-padding-inline-start, calc(var(--db-spacing-fixed-2xs) + var(--db-spacing-fixed-2xs) + var(--db-icon-font-size, 1lh)));
1130
1114
  }
1131
1115
  .db-tag:has(label, button:not(.db-tab-remove-button), a) input:checked {
1132
1116
  background-color: transparent;
@@ -1175,11 +1159,10 @@
1175
1159
  }
1176
1160
 
1177
1161
  .db-tag[data-show-check-state=true] label {
1178
- --db-icon-margin-start: var(--db-spacing-fixed-2xs);
1162
+ gap: var(--db-spacing-fixed-2xs);
1179
1163
  }
1180
1164
  .db-tag[data-show-check-state=true] label:not([data-show-icon-trailing=false])::after {
1181
1165
  --db-icon-trailing: "circle";
1182
- margin-inline-start: var(--db-icon-margin-start, var(--db-spacing-fixed-xs));
1183
1166
  content: var(--db-icon-trailing, attr(data-icon-trailing));
1184
1167
  }
1185
1168
  @supports (content: ""/"") {
@@ -1192,7 +1175,6 @@
1192
1175
  }
1193
1176
  .db-tag[data-show-check-state=true] label:has(input:checked):not([data-show-icon-trailing=false])::after {
1194
1177
  --db-icon-trailing: "check_circle";
1195
- margin-inline-start: var(--db-icon-margin-start, var(--db-spacing-fixed-xs));
1196
1178
  content: var(--db-icon-trailing, attr(data-icon-trailing));
1197
1179
  }
1198
1180
  @supports (content: ""/"") {
@@ -1249,7 +1231,6 @@
1249
1231
  text-decoration: none;
1250
1232
  }
1251
1233
  .db-tag a::after {
1252
- --db-icon-margin-start: 0;
1253
1234
  --db-icon-font-size: 0;
1254
1235
  content: none !important;
1255
1236
  }
@@ -43,8 +43,6 @@
43
43
  }
44
44
 
45
45
  %db-tag {
46
- --db-icon-margin-end: 0;
47
-
48
46
  @extend %default-interactive-component;
49
47
  @extend %db-overwrite-font-size-sm;
50
48
  @extend %default-button;
@@ -64,9 +62,10 @@
64
62
  }
65
63
 
66
64
  &:has(#{tag-components.$interactive-selectors}) {
67
- --db-icon-margin-end: #{variables.$db-spacing-fixed-2xs};
68
-
69
- @include icon-passing.icon-passing(variables.$db-spacing-fixed-2xs);
65
+ @include icon-passing.icon-passing(
66
+ variables.$db-spacing-fixed-2xs,
67
+ variables.$db-spacing-fixed-2xs
68
+ );
70
69
  @include tag-components.get-tag-colors-interactive;
71
70
  }
72
71
 
@@ -95,7 +94,7 @@
95
94
 
96
95
  &[data-show-check-state="true"] {
97
96
  label {
98
- --db-icon-margin-start: #{variables.$db-spacing-fixed-2xs};
97
+ gap: variables.$db-spacing-fixed-2xs;
99
98
 
100
99
  @include icons.set-icon("circle", "after");
101
100
 
@@ -165,7 +164,6 @@
165
164
  text-decoration: none;
166
165
 
167
166
  &::after {
168
- --db-icon-margin-start: 0;
169
167
  --db-icon-font-size: 0;
170
168
 
171
169
  content: none !important;