-
Notifications
You must be signed in to change notification settings - Fork 0
/
demograph.css
78 lines (64 loc) · 1.93 KB
/
demograph.css
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
66
67
68
69
70
71
72
73
74
75
76
77
canvas {
position: relative;
}
#region {
margin-right: 15px;
}
#yearSlider {
width: 100%; /* Set the desired width. Here I set it to 80% of the container's width */
display: grid; /* This will center the slider if the container's width is set to 100% */
grid-template-columns: max-content;
}
.slider-container {
position: relative;
width: 100%; /* Adjust to your preference */
margin-left: 0; /* Center the slider */
}
.year-ruler {
display: flex;
justify-content: space-between; /* Distributes children evenly */
width: 10%; /* Makes sure the ruler spans the entire width of its container */
margin-left: 70px;
}
.year-ruler span {
white-space: nowrap; /* Prevents the year from breaking into two lines */
display: none;
}
/* Remove default appearance of the slider thumb */
input[type="range"]::-webkit-slider-thumb {
width: 20px; /* Adjust width and height to fit your design */
height: 20px;
clip-path: polygon(50% 100%, 0% 0%, 100% 0%);
background-color: #666;
border-radius: 0; /* Remove any border-radius */
border: none; /* Remove borders */
}
input[type="range"]::-moz-range-thumb {
width: 20px;
height: 20px;
clip-path: polygon(50% 100%, 0% 0%, 100% 0%);
background-color: transparent;
border-radius: none;
border: none;
}
input[type="range"]::-ms-thumb {
width: 20px;
height: 20px;
clip-path: polygon(50% 100%, 0% 0%, 100% 0%);
background-color: transparent;
border-radius: none;
border: none;
}
/* Styling the thumb as an upside-down triangle */
input[type="range"]::-webkit-slider-thumb {
clip-path: polygon(50% 100%, 0% 20%, 100% 20%);
background-color: #666;
}
input[type="range"]::-moz-range-thumb {
clip-path: polygon(50% 100%, 0% 20%, 100% 20%);
background-color: #666;
}
input[type="range"]::-ms-thumb {
clip-path: polygon(50% 100%, 0% 20%, 100% 20%);
background-color: #666;
}