-
Notifications
You must be signed in to change notification settings - Fork 42
/
range.element.scss
65 lines (56 loc) · 1.75 KB
/
range.element.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
// This software is released under MIT license.
// The full license information can be found in LICENSE in the root directory of this project.
@import './../styles/tokens/generated/index';
:host {
--track-background: #{$cds-alias-status-neutral};
--track-fill-background: #{$cds-alias-status-info};
--track-height: #{$cds-alias-object-border-width-400};
--track-width: 50%;
--thumb-background: #{$cds-alias-status-info};
--thumb-width: calc(#{$cds-alias-object-border-width-400} + calc(#{$cds-global-space-5} + #{$cds-global-space-1}));
--thumb-height: calc(#{$cds-alias-object-border-width-400} + calc(#{$cds-global-space-5} + #{$cds-global-space-1}));
display: block;
width: 100%;
}
.input-container {
position: relative;
}
::slotted(input) {
-webkit-appearance: none;
width: 100%;
height: var(--track-height);
margin: $cds-global-space-5 0 $cds-global-space-4 0;
position: relative;
padding: 0 !important;
padding: $cds-global-space-4 0;
cursor: pointer;
}
.input-track {
position: absolute;
top: $cds-global-space-6;
left: 0;
width: var(--track-width);
height: var(--track-height);
background: var(--track-fill-background);
border-radius: var(--border-radius, #{$cds-alias-object-border-radius-100});
pointer-events: none;
z-index: 999;
}
:host([_disabled]) {
--track-background: #{$cds-alias-status-disabled-tint};
--track-fill-background: #{$cds-alias-status-disabled};
--thumb-background: #{$cds-alias-status-disabled};
::slotted(input),
.input {
cursor: not-allowed;
}
}
.rtl .input-track {
left: initial;
right: 0;
}
// aligns control to 24px standard height
.input-container {
padding: $cds-global-space-6 0 $cds-global-space-5 0;
}