Skip to content

Commit 63e63c0

Browse files
committed
fix(@clayui/css): Progress Bar sets a min-width on progress-group-addon to prevent resizing progress bar when numbers are changed to icons
fix(@clayui/css): Progress Bar adds Sass map `$progress-group-addon` fixes #4024
1 parent c90707b commit 63e63c0

File tree

2 files changed

+26
-7
lines changed

2 files changed

+26
-7
lines changed

packages/clay-css/src/scss/components/_progress-bars.scss

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,18 @@
8585
}
8686

8787
.progress-group-addon {
88-
font-size: $progress-group-addon-font-size;
89-
font-weight: $progress-group-addon-font-weight;
90-
margin-right: $progress-group-addon-spacer-x;
91-
text-align: center;
88+
@include clay-css($progress-group-addon);
9289

9390
&:first-child {
94-
padding-left: 0;
91+
$first-child: setter(map-get($progress-group-addon, first-child), ());
92+
93+
@include clay-css($first-child);
9594
}
9695

9796
&:last-child {
98-
padding-right: 0;
97+
$last-child: setter(map-get($progress-group-addon, last-child), ());
98+
99+
@include clay-css($last-child);
99100
}
100101
}
101102

packages/clay-css/src/scss/variables/_progress-bars.scss

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,25 @@ $progress-group-subtitle: () !default;
2323

2424
$progress-group-addon-font-size: null !default;
2525
$progress-group-addon-font-weight: null !default;
26-
$progress-group-addon-spacer-x: 1rem !default;
26+
$progress-group-addon-spacer-x: 0.25rem !default;
27+
28+
$progress-group-addon: () !default;
29+
$progress-group-addon: map-deep-merge(
30+
(
31+
font-size: $progress-group-addon-font-size,
32+
font-weight: $progress-group-addon-font-weight,
33+
margin-right: $progress-group-addon-spacer-x,
34+
min-width: 2rem,
35+
text-align: center,
36+
first-child: (
37+
padding-left: 0,
38+
),
39+
last-child: (
40+
padding-right: 0,
41+
),
42+
),
43+
$progress-group-addon
44+
);
2745

2846
$progress-group-stacked-progress-margin-bottom: 0.25rem !default;
2947
$progress-group-stacked-progress-margin-top: 0.25rem !default;

0 commit comments

Comments
 (0)