Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Remove obsolete variable and use a custom property for Slider #10779

Merged
merged 3 commits into from
May 9, 2023
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
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