Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(@clayui/css): Progress Bar sets a min-width on `progress-group-… #4040

Merged
merged 1 commit into from
May 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
  • Loading branch information
pat270 committed Apr 30, 2021
commit 63e63c0b34eb630e72fb7585427f25c0b7eaec1e
13 changes: 7 additions & 6 deletions packages/clay-css/src/scss/components/_progress-bars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,18 @@
}

.progress-group-addon {
font-size: $progress-group-addon-font-size;
font-weight: $progress-group-addon-font-weight;
margin-right: $progress-group-addon-spacer-x;
text-align: center;
@include clay-css($progress-group-addon);

&:first-child {
padding-left: 0;
$first-child: setter(map-get($progress-group-addon, first-child), ());

@include clay-css($first-child);
}

&:last-child {
padding-right: 0;
$last-child: setter(map-get($progress-group-addon, last-child), ());

@include clay-css($last-child);
}
}

Expand Down
20 changes: 19 additions & 1 deletion packages/clay-css/src/scss/variables/_progress-bars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,25 @@ $progress-group-subtitle: () !default;

$progress-group-addon-font-size: null !default;
$progress-group-addon-font-weight: null !default;
$progress-group-addon-spacer-x: 1rem !default;
$progress-group-addon-spacer-x: 0.25rem !default;

$progress-group-addon: () !default;
$progress-group-addon: map-deep-merge(
(
font-size: $progress-group-addon-font-size,
font-weight: $progress-group-addon-font-weight,
margin-right: $progress-group-addon-spacer-x,
min-width: 2rem,
text-align: center,
first-child: (
padding-left: 0,
),
last-child: (
padding-right: 0,
),
),
$progress-group-addon
);

$progress-group-stacked-progress-margin-bottom: 0.25rem !default;
$progress-group-stacked-progress-margin-top: 0.25rem !default;
Expand Down