Skip to content

Commit

Permalink
Remove an obsolete variable and use a custom property for Slider (#10779
Browse files Browse the repository at this point in the history
)
  • Loading branch information
luixxiul committed May 9, 2023
1 parent 1cfe126 commit dc9a00f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
3 changes: 0 additions & 3 deletions res/css/_common.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ $hover-transition: 0.08s cubic-bezier(0.46, 0.03, 0.52, 0.96); /* quadratic */

$selected-message-border-width: 4px;

$slider-dot-size: 1em;
$slider-selection-dot-size: 2.4em;

$timeline-image-border-radius: 8px;
:root {
font-size: 10px;
Expand Down
15 changes: 8 additions & 7 deletions res/css/views/elements/_Slider.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ limitations under the License.
font-size: 1em; // set base multiplier for em units applied later

--active-color: $accent;
--selection-dot-size: 2.4em;

&:disabled {
cursor: not-allowed;
Expand All @@ -47,12 +48,12 @@ limitations under the License.
}
&::-webkit-slider-thumb {
border: 0 solid #000000;
width: $slider-selection-dot-size;
height: $slider-selection-dot-size;
width: var(--selection-dot-size);
height: var(--selection-dot-size);
background: var(--active-color);
border-radius: 50%;
-webkit-appearance: none;
margin-top: calc(2px + 1.2em - $slider-selection-dot-size);
margin-top: calc(2px + 1.2em - var(--selection-dot-size));
}
&:focus::-webkit-slider-runnable-track {
background: $slider-background-color;
Expand All @@ -73,8 +74,8 @@ limitations under the License.
}
&::-moz-range-thumb {
border: 0 solid #000000;
width: $slider-selection-dot-size;
height: $slider-selection-dot-size;
width: var(--selection-dot-size);
height: var(--selection-dot-size);
background: var(--active-color);
border-radius: 50%;
}
Expand All @@ -94,8 +95,8 @@ limitations under the License.
}
&::-ms-thumb {
margin-top: 1px;
width: $slider-selection-dot-size;
height: $slider-selection-dot-size;
width: var(--selection-dot-size);
height: var(--selection-dot-size);
background: var(--active-color);
border-radius: 50%;
}
Expand Down

0 comments on commit dc9a00f

Please sign in to comment.