-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #337 from djeck1432/fix/slidebar
fix/slider
- Loading branch information
Showing
6 changed files
with
162 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,209 +1,206 @@ | ||
.slider-container { | ||
width: 100%; | ||
border: none; | ||
padding-top: 48px; | ||
width: 100%; | ||
border: none; | ||
padding-top: 48px; | ||
} | ||
|
||
.slider { | ||
position: relative; | ||
height: 8px; | ||
width: 100%; | ||
cursor: pointer; | ||
position: relative; | ||
height: 8px; | ||
width: 100%; | ||
cursor: pointer; | ||
} | ||
|
||
.slider-track { | ||
position: absolute; | ||
height: 100%; | ||
width: 100%; | ||
border-radius: 9999px; | ||
overflow: hidden; | ||
border: 1px solid var(--footer-divider-bg); | ||
position: absolute; | ||
height: 100%; | ||
width: 100%; | ||
border-radius: 9999px; | ||
overflow: hidden; | ||
border: 1px solid var(--footer-divider-bg); | ||
} | ||
|
||
.slider-track-wrapper { | ||
position: absolute; | ||
height: 100%; | ||
width: 100%; | ||
border-radius: 9999px; | ||
overflow: hidden; | ||
padding: 1px; | ||
position: absolute; | ||
height: 100%; | ||
width: 100%; | ||
border-radius: 9999px; | ||
overflow: hidden; | ||
padding: 1px; | ||
} | ||
|
||
.slider-range { | ||
position: absolute; | ||
height: 100%; | ||
background: linear-gradient(to right, #49ABD2, #E01DEE); | ||
position: absolute; | ||
height: 100%; | ||
background: linear-gradient(to right, #49abd2, #e01dee); | ||
} | ||
|
||
.slider-thumb { | ||
position: absolute; | ||
top: 50%; | ||
transform: translate(-50%, -50%); | ||
transition: background-color 0.3s; | ||
position: absolute; | ||
top: 50%; | ||
transform: translate(-50%, -50%); | ||
transition: background-color 0.3s; | ||
} | ||
|
||
.tooltip { | ||
position: absolute; | ||
height: 35.6px; | ||
width: 46px; | ||
bottom: 42px; | ||
left: 50%; | ||
transform: translateX(-50%); | ||
background-color: #2C5475; | ||
color: #ffffff; | ||
font-size: 14px; | ||
padding: 6px 8px; | ||
border-radius: 7.17px; | ||
opacity: 0.9; | ||
transition: opacity 0.2s ease-in-out; | ||
text-align: center; | ||
position: absolute; | ||
height: 35.6px; | ||
width: 46px; | ||
bottom: 42px; | ||
left: 50%; | ||
transform: translateX(-50%); | ||
background-color: #2c5475; | ||
color: #ffffff; | ||
font-size: 14px; | ||
padding: 6px 8px; | ||
border-radius: 7.17px; | ||
opacity: 0.9; | ||
transition: opacity 0.2s ease-in-out; | ||
text-align: center; | ||
} | ||
|
||
.tooltip:after { | ||
content: ""; | ||
position: absolute; | ||
bottom: -13px; | ||
left: 50%; | ||
transform: translateX(-50%); | ||
border-width: 7px; | ||
border-style: solid; | ||
border-color: #2C5475 transparent transparent transparent; | ||
content: ''; | ||
position: absolute; | ||
bottom: -13px; | ||
left: 50%; | ||
transform: translateX(-50%); | ||
border-width: 7px; | ||
border-style: solid; | ||
border-color: #2c5475 transparent transparent transparent; | ||
} | ||
|
||
.multiplier-slider-container { | ||
margin: 15px 1px -10px 8px; | ||
width: 97%; | ||
margin: 15px 1px -10px 8px; | ||
width: 97%; | ||
} | ||
|
||
.slider-with-tooltip { | ||
position: relative; | ||
width: 100%; | ||
position: relative; | ||
width: 100%; | ||
} | ||
|
||
.error-message { | ||
color: var(--borrow-color); | ||
background-color: #ffe6e6; | ||
padding: 10px; | ||
border-radius: 4px; | ||
margin: 10px 0; | ||
text-align: center; | ||
font-weight: bold; | ||
color: var(--borrow-color); | ||
background-color: #ffe6e6; | ||
padding: 10px; | ||
border-radius: 4px; | ||
margin: 10px 0; | ||
text-align: center; | ||
font-weight: bold; | ||
} | ||
|
||
div.slider-skeleton { | ||
width: 100%; | ||
padding: 10px 20px; | ||
background: linear-gradient(90deg, var(--primary) 25%, var(--secondary) 50%, var(--primary) 75%); | ||
background-size: 200% 100%; | ||
animation: loading 1.5s infinite; | ||
border-radius: 2px; | ||
margin: 20px 0; | ||
color: var(--primary-color); | ||
width: 100%; | ||
padding: 10px 20px; | ||
background: linear-gradient(90deg, var(--primary) 25%, var(--secondary) 50%, var(--primary) 75%); | ||
background-size: 200% 100%; | ||
animation: loading 1.5s infinite; | ||
border-radius: 2px; | ||
margin: 20px 0; | ||
color: var(--primary-color); | ||
} | ||
|
||
.mark-container { | ||
width: 100%; | ||
display: flex; | ||
justify-content: space-between; | ||
margin-top: 20px; | ||
width: 100%; | ||
display: flex; | ||
justify-content: space-between; | ||
margin-top: 20px; | ||
} | ||
|
||
.mark-item { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 8px; | ||
align-items: center; | ||
width: 18px; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 8px; | ||
align-items: center; | ||
width: 18px; | ||
} | ||
|
||
div.marker { | ||
background: var(--slider-gray); | ||
width: 4px; | ||
height: 12px; | ||
border-radius: 12px; | ||
background: var(--slider-gray); | ||
width: 4px; | ||
height: 12px; | ||
border-radius: 12px; | ||
} | ||
|
||
.mark-item.active div.marker { | ||
background: var(--light-blue); | ||
width: 4px; | ||
height: 12px; | ||
border-radius: 12px; | ||
background: var(--light-blue); | ||
width: 4px; | ||
height: 12px; | ||
border-radius: 12px; | ||
} | ||
|
||
.mark-label { | ||
color: var(--slider-gray); | ||
font-size: 0.875rem; | ||
color: var(--slider-gray); | ||
font-size: 0.875rem; | ||
} | ||
|
||
.mark-item.active .mark-label { | ||
color: var(--primary); | ||
font-size: 0.875rem; | ||
color: var(--primary); | ||
font-size: 0.875rem; | ||
} | ||
|
||
|
||
@keyframes loading { | ||
0% { | ||
background-position: 200% 0; | ||
} | ||
0% { | ||
background-position: 200% 0; | ||
} | ||
|
||
100% { | ||
background-position: -200% 0; | ||
} | ||
100% { | ||
background-position: -200% 0; | ||
} | ||
} | ||
|
||
|
||
|
||
/* Responsiveness */ | ||
/* Mobile */ | ||
@media (max-width: 768px) { | ||
.multiplier-slider-container { | ||
margin: 10px 0px -10px 0; | ||
width: 100%; | ||
padding: 0px 9px; | ||
} | ||
|
||
.slider-container { | ||
height: 112px; | ||
border: none; | ||
max-height: 85px; | ||
width: 100%; | ||
padding-top: 32px; | ||
} | ||
|
||
.slider { | ||
height: 8px; | ||
} | ||
|
||
.cursor { | ||
height: 24px; | ||
width: 23.49px; | ||
} | ||
|
||
.tooltip { | ||
font-size: 12px; | ||
padding: 3px; | ||
height: 25.41px; | ||
width: 36px; | ||
bottom: 32px; | ||
} | ||
|
||
.tooltip:after { | ||
border-width: 6px; | ||
bottom: -11px; | ||
} | ||
|
||
.mark-item { | ||
gap: 4px; | ||
} | ||
|
||
div.marker, | ||
.mark-item.active div.marker { | ||
width: 2px; | ||
height: 8px; | ||
} | ||
|
||
.mark-item.active .mark-label, | ||
.mark-label { | ||
font-size: 10px; | ||
} | ||
} | ||
.multiplier-slider-container { | ||
margin: 10px 0px -10px 0; | ||
width: 100%; | ||
padding: 0px 9px; | ||
} | ||
|
||
.slider-container { | ||
height: 112px; | ||
border: none; | ||
max-height: 85px; | ||
width: 100%; | ||
padding-top: 32px; | ||
} | ||
|
||
.slider { | ||
height: 8px; | ||
} | ||
|
||
.cursor { | ||
height: 24px; | ||
width: 23.49px; | ||
} | ||
|
||
.tooltip { | ||
font-size: 12px; | ||
padding: 3px; | ||
height: 25.41px; | ||
width: 36px; | ||
bottom: 32px; | ||
} | ||
|
||
.tooltip:after { | ||
border-width: 6px; | ||
bottom: -11px; | ||
} | ||
|
||
.mark-item { | ||
gap: 4px; | ||
} | ||
|
||
div.marker, | ||
.mark-item.active div.marker { | ||
width: 2px; | ||
height: 8px; | ||
} | ||
|
||
.mark-item.active .mark-label, | ||
.mark-label { | ||
font-size: 10px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.