Skip to content

Commit

Permalink
fix(slider): Remove margin block and align labels for vertical
Browse files Browse the repository at this point in the history
  • Loading branch information
Marko OLEKSIYENKO authored and quentinderoubaix committed Nov 8, 2023
1 parent baa93b6 commit c9ba24b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions style-bootstrap/scss/_slider.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ $prefix: au-;
--#{$prefix}slider-margin-block-end: #{$slider-margin-block-end};
--#{$prefix}slider-vertical-margin-inline-start: #{$slider-vertical-margin-inline-start};
--#{$prefix}slider-vertical-margin-inline-end: #{$slider-vertical-margin-inline-end};
--#{$prefix}slider-vertical-margin-block: #{$slider-vertical-margin-block};

--#{$prefix}slider-translate-vertical: #{$slider-translate-vertical};
--#{$prefix}slider-translate-horizontal: #{$slider-translate-horizontal};

Expand All @@ -32,7 +30,8 @@ $prefix: au-;
--#{$prefix}slider-label-now-transform: #{$slider-label-now-transform};

--#{$prefix}slider-label-vertical-margin-inline-start: #{$slider-label-vertical-margin-inline-start};
--#{$prefix}slider-label-vertical-transform: #{$slider-label-vertical-transform};
--#{$prefix}slider-label-vertical-min-transform: #{$slider-label-vertical-min-transform};
--#{$prefix}slider-label-vertical-max-transform: #{$slider-label-vertical-max-transform};
--#{$prefix}slider-label-vertical-white-space: #{$slider-label-vertical-white-space};
--#{$prefix}slider-label-vertical-min-top: #{$slider-label-vertical-min-top};
--#{$prefix}slider-label-vertical-max-top: #{$slider-label-vertical-max-top};
Expand Down Expand Up @@ -66,7 +65,6 @@ $prefix: au-;
width: var(--#{$prefix}slider-secondary-size);
margin-inline-start: var(--#{$prefix}slider-vertical-margin-inline-start);
margin-inline-end: var(--#{$prefix}slider-vertical-margin-inline-end);
margin-block: var(--#{$prefix}slider-vertical-margin-block);
.au-slider-handle-vertical {
transform: var(--#{$prefix}slider-translate-vertical);
}
Expand Down Expand Up @@ -116,15 +114,16 @@ $prefix: au-;
.au-slider-label-vertical {
position: absolute;
margin-inline-start: var(--#{$prefix}slider-label-vertical-margin-inline-start);
transform: var(--#{$prefix}slider-label-vertical-transform);
white-space: var(--#{$prefix}slider-label-vertical-white-space);

&.au-slider-label-vertical-min {
top: var(--#{$prefix}slider-label-vertical-min-top);
transform: var(--#{$prefix}slider-label-vertical-min-transform);
}

&.au-slider-label-vertical-max {
top: var(--#{$prefix}slider-label-vertical-max-top);
transform: var(--#{$prefix}slider-label-vertical-max-transform);
}

&.au-slider-label-vertical-now {
Expand Down
4 changes: 2 additions & 2 deletions style-bootstrap/scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ $slider-margin-block-start: 2rem !default;
$slider-margin-block-end: 1rem !default;
$slider-vertical-margin-inline-start: 1rem !default;
$slider-vertical-margin-inline-end: 3rem !default;
$slider-vertical-margin-block: 3rem !default;
$slider-translate-vertical: translate(-40%, -50%) !default;
$slider-translate-horizontal: translate(-50%, -40%) !default;
$focus-ring-opacity: 0.25 !default;
Expand All @@ -28,7 +27,8 @@ $slider-label-min-left: 0;
$slider-label-max-right: 0;
$slider-label-now-transform: translateX(-50%) !default;
$slider-label-vertical-margin-inline-start: 1rem !default;
$slider-label-vertical-transform: translateY(-40%) !default;
$slider-label-vertical-min-transform: translateY(-75%) !default;
$slider-label-vertical-max-transform: translateY(-25%) !default;
$slider-label-vertical-white-space: nowrap !default;
$slider-label-vertical-min-top: 100% !default;
$slider-label-vertical-max-top: 0% !default;
Expand Down

0 comments on commit c9ba24b

Please sign in to comment.