Skip to content

Commit 43a804e

Browse files
committed
[Frontend] Styling for Time Conductor v2
Fixes #933 WIP: Added zoom current range indicator; tweaks to style
1 parent b3a4f52 commit 43a804e

File tree

3 files changed

+29
-12
lines changed

3 files changed

+29
-12
lines changed

platform/commonUI/general/res/sass/controls/_controls.scss

+14-4
Original file line numberDiff line numberDiff line change
@@ -430,25 +430,35 @@ input[type="search"] {
430430
//border-radius: 50% !important;
431431
}
432432

433+
@mixin sliderKnobRound() {
434+
$h: 12px;
435+
cursor: pointer;
436+
width: $h;
437+
height: $h;
438+
margin-top: 1 + floor($h/2) * -1;
439+
@include btnSubtle(pullForward($colorBtnBg, 10%));
440+
border-radius: 50% !important;
441+
}
442+
433443
input[type="range"] {
434444
// HTML5 range inputs
435445

436446
-webkit-appearance: none; /* Hides the slider so that custom slider can be made */
437447
background: transparent; /* Otherwise white in Chrome */
438448
&:focus {
439-
outline: none; /* Removes the blue border. You should probably do some kind of focus styling for accessibility reasons though. */
449+
outline: none; /* Removes the blue border. */
440450
}
441451

442452
// Thumb
443453
&::-webkit-slider-thumb {
444454
-webkit-appearance: none;
445-
@include sliderKnob();
455+
@include sliderKnobRound();
446456
}
447457
&::-moz-range-thumb {
448-
@include sliderKnob();
458+
@include sliderKnobRound();
449459
}
450460
&::-ms-thumb {
451-
@include sliderKnob();
461+
@include sliderKnobRound();
452462
}
453463

454464
// Track

platform/commonUI/general/res/sass/controls/_time-conductor.scss

+12-6
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@
119119
}
120120

121121
.l-time-conductor-inputs-holder,
122-
.l-time-conductor-ticks {
122+
.l-time-conductor-ticks,
123+
.l-time-conductor-zoom-w {
123124
font-size: 0.8rem;
124125
}
125126

@@ -203,11 +204,16 @@
203204
.l-time-conductor-controls {
204205
align-items: center;
205206
margin-top: $interiorMargin;
206-
.time-conductor-zoom {
207-
//@include test();
208-
min-width: 100px;
209-
height: $r3H;
210-
width: 25%;
207+
.l-time-conductor-zoom-w {
208+
@include justify-content(flex-end);
209+
.time-conductor-zoom {
210+
height: $r3H;
211+
min-width: 100px;
212+
width: 20%;
213+
}
214+
.time-conductor-zoom-current-range {
215+
color: $colorTick;
216+
}
211217
}
212218

213219
}

platform/features/conductor-v2/res/templates/time-conductor.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,9 @@
105105
]}">
106106
</mct-control>
107107
<!-- Zoom control -->
108-
<div class="l-time-conductor-zoom-w grows flex-elem contents-align-right">
109-
<input class="time-conductor-zoom" type="range" />
108+
<div class="l-time-conductor-zoom-w grows flex-elem l-flex-row">
109+
<span class="time-conductor-zoom-current-range flex-elem flex-fixed holder">Mars Minutes</span>
110+
<input class="time-conductor-zoom flex-elem" type="range" />
110111
</div>
111112
</div>
112113

0 commit comments

Comments
 (0)