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

Commit dc9a00f

Browse files
authored
Remove an obsolete variable and use a custom property for Slider (#10779)
1 parent 1cfe126 commit dc9a00f

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

res/css/_common.pcss

-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ $hover-transition: 0.08s cubic-bezier(0.46, 0.03, 0.52, 0.96); /* quadratic */
2727

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

30-
$slider-dot-size: 1em;
31-
$slider-selection-dot-size: 2.4em;
32-
3330
$timeline-image-border-radius: 8px;
3431
:root {
3532
font-size: 10px;

res/css/views/elements/_Slider.pcss

+8-7
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ limitations under the License.
2727
font-size: 1em; // set base multiplier for em units applied later
2828

2929
--active-color: $accent;
30+
--selection-dot-size: 2.4em;
3031

3132
&:disabled {
3233
cursor: not-allowed;
@@ -47,12 +48,12 @@ limitations under the License.
4748
}
4849
&::-webkit-slider-thumb {
4950
border: 0 solid #000000;
50-
width: $slider-selection-dot-size;
51-
height: $slider-selection-dot-size;
51+
width: var(--selection-dot-size);
52+
height: var(--selection-dot-size);
5253
background: var(--active-color);
5354
border-radius: 50%;
5455
-webkit-appearance: none;
55-
margin-top: calc(2px + 1.2em - $slider-selection-dot-size);
56+
margin-top: calc(2px + 1.2em - var(--selection-dot-size));
5657
}
5758
&:focus::-webkit-slider-runnable-track {
5859
background: $slider-background-color;
@@ -73,8 +74,8 @@ limitations under the License.
7374
}
7475
&::-moz-range-thumb {
7576
border: 0 solid #000000;
76-
width: $slider-selection-dot-size;
77-
height: $slider-selection-dot-size;
77+
width: var(--selection-dot-size);
78+
height: var(--selection-dot-size);
7879
background: var(--active-color);
7980
border-radius: 50%;
8081
}
@@ -94,8 +95,8 @@ limitations under the License.
9495
}
9596
&::-ms-thumb {
9697
margin-top: 1px;
97-
width: $slider-selection-dot-size;
98-
height: $slider-selection-dot-size;
98+
width: var(--selection-dot-size);
99+
height: var(--selection-dot-size);
99100
background: var(--active-color);
100101
border-radius: 50%;
101102
}

0 commit comments

Comments
 (0)