Skip to content

Commit

Permalink
feat(progress-bar): support contextual layout tokens (density) (#13924)
Browse files Browse the repository at this point in the history
Co-authored-by: Francine Lucca <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Jun 6, 2023
1 parent da40c39 commit 57decc1
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions packages/styles/scss/components/progress-bar/_progress-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,24 @@
@use '../../type' as *;
@use '../../utilities/convert' as *;
@use '../../utilities/visually-hidden' as *;
@use '../../utilities/layout';

/// Progress Bar styles
/// @access public
/// @group progress-bar
@mixin progress-bar {
.#{$prefix}--progress-bar {
@include layout.use('density', $default: 'normal');
}

.#{$prefix}--progress-bar__label {
@include type-style('body-compact-01');

display: flex;
min-width: rem(48px);
justify-content: space-between;
margin-bottom: $spacing-03;
color: $text-primary;
margin-block-end: $spacing-03;
}

.#{$prefix}--progress-bar__label-text {
Expand Down Expand Up @@ -90,7 +95,7 @@

.#{$prefix}--progress-bar__status-icon {
flex-shrink: 0;
margin-left: $spacing-05;
margin-inline-start: layout.density('padding-inline');
}

.#{$prefix}--progress-bar--finished .#{$prefix}--progress-bar__bar,
Expand Down Expand Up @@ -122,7 +127,7 @@
.#{$prefix}--progress-bar__label {
flex-shrink: 1;
justify-content: flex-start;
margin-right: 0;
margin-inline-end: 0;
}

@keyframes progress-bar-indeterminate {
Expand All @@ -144,7 +149,7 @@
.#{$prefix}--progress-bar--inline .#{$prefix}--progress-bar__label {
flex-shrink: 0;
margin-bottom: 0;
margin-inline-end: $spacing-05;
margin-inline-end: layout.density('padding-inline');
}

.#{$prefix}--progress-bar--inline .#{$prefix}--progress-bar__track {
Expand All @@ -158,6 +163,6 @@

.#{$prefix}--progress-bar--indented .#{$prefix}--progress-bar__label,
.#{$prefix}--progress-bar--indented .#{$prefix}--progress-bar__helper-text {
padding-inline: $spacing-05;
padding-inline: layout.density('padding-inline');
}
}

0 comments on commit 57decc1

Please sign in to comment.