forked from devhatt/pet-dex-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: add breakpoint and scss vars in style file
fix devhatt#26
- Loading branch information
1 parent
8a0f24a
commit c25ae3a
Showing
2 changed files
with
72 additions
and
56 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,94 @@ | ||
@use '~styles/base.scss'; | ||
@use '~styles/colors.scss' as colors; | ||
@use '~styles/breakpoints.scss' as breakpoints; | ||
|
||
.range-slider { | ||
width: 100%; | ||
} | ||
|
||
.range-slider__button { | ||
color: rgb(209, 230, 255); | ||
&__button { | ||
color: rgb(209, 230, 255); | ||
|
||
font-size: 2rem; | ||
font-size: 2rem; | ||
|
||
padding: 10px 20px; | ||
border: 2px solid rgb(18, 104, 204); | ||
padding: 1rem; | ||
border: 2px solid colors.$blue600; | ||
|
||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
|
||
background-color: rgb(27, 133, 243); | ||
transform: translate(-50%, -50%); | ||
background-color: colors.$blue500; | ||
transform: translate(-50%, -50%); | ||
|
||
border-radius: 8px; | ||
border-radius: 0.8rem; | ||
|
||
cursor: grab; | ||
letter-spacing: 1; | ||
} | ||
cursor: grab; | ||
letter-spacing: 1; | ||
} | ||
|
||
.range-slider__value { | ||
font-family: 'Noto Sans', sans-serif; | ||
color: rgb(27, 133, 243); | ||
&__value { | ||
font-family: 'Noto Sans', sans-serif; | ||
color: colors.$blue500; | ||
|
||
text-align: center; | ||
font-size: 8rem; | ||
font-weight: 700; | ||
text-align: center; | ||
font-size: 8rem; | ||
font-weight: 700; | ||
|
||
margin-bottom: 2rem; | ||
} | ||
margin-bottom: 2rem; | ||
} | ||
|
||
.range-slider__content { | ||
width: 100%; | ||
height: 100px; | ||
overflow: hidden; | ||
&__content { | ||
width: 100%; | ||
height: 100px; | ||
overflow: hidden; | ||
|
||
position: relative; | ||
position: relative; | ||
|
||
background-image: url('../../home/images/ruler-slider.svg'); | ||
background-repeat: repeat-x; | ||
background-position: 0 center; | ||
} | ||
background-image: url('../../home/images/ruler-slider.svg'); | ||
background-repeat: repeat-x; | ||
background-position: 0 center; | ||
} | ||
|
||
.range-slider__content::before { | ||
left: 0; | ||
&__content::before { | ||
left: 0; | ||
|
||
background: linear-gradient( | ||
to right, | ||
rgb(255, 255, 255), | ||
rgba(255, 255, 255, 0) | ||
); | ||
} | ||
background: linear-gradient( | ||
to right, | ||
colors.$appContentColor, | ||
rgba(255, 255, 255, 0) | ||
); | ||
} | ||
|
||
.range-slider__content::after { | ||
right: 0; | ||
&__content::after { | ||
right: 0; | ||
|
||
background: linear-gradient( | ||
to left, | ||
rgb(255, 255, 255), | ||
rgba(255, 255, 255, 0) | ||
); | ||
} | ||
background: linear-gradient( | ||
to left, | ||
colors.$appContentColor, | ||
rgba(255, 255, 255, 0) | ||
); | ||
} | ||
|
||
&__content::before, | ||
&__content::after { | ||
width: 30px; | ||
height: 100%; | ||
|
||
.range-slider__content::before, | ||
.range-slider__content::after { | ||
width: 200px; | ||
height: 100%; | ||
position: absolute; | ||
z-index: 2; | ||
|
||
pointer-events: none; | ||
content: ''; | ||
} | ||
} | ||
|
||
position: absolute; | ||
z-index: 2; | ||
@include breakpoints.from667 { | ||
.range-slider__content::before, | ||
.range-slider__content::after { | ||
width: 16%; | ||
} | ||
|
||
pointer-events: none; | ||
content: ''; | ||
.range-slider__button { | ||
padding: 1rem 2rem; | ||
} | ||
} |
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