-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ee8aa11
commit 352ead6
Showing
22 changed files
with
753 additions
and
138 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
88 changes: 44 additions & 44 deletions
88
src/components/CustomCheckbox/custom_checkbox.module.scss
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,50 +1,50 @@ | ||
@use 'src/styles/utility' as *; | ||
|
||
.customCheckboxContainer { | ||
display: flex; | ||
justify-content: center; | ||
display: flex; | ||
justify-content: center; | ||
position: relative; | ||
min-width: rem(1.6); | ||
padding-top: rem(0.8); | ||
z-index: 0; | ||
margin-bottom: auto; | ||
@media screen and (min-width: 992px) { | ||
align-items: center; | ||
} | ||
label { | ||
cursor: pointer; | ||
margin-left: rem(1.5); | ||
} | ||
.checkboxContainer { | ||
position: relative; | ||
width: rem(1.5); | ||
height: rem(1.5); | ||
} | ||
.customCheckbox { | ||
position: absolute; | ||
background-repeat: no-repeat; | ||
display: inline-block; | ||
border: 2px solid var(--ifm-color-emphasis-500); | ||
min-width: rem(1.6); | ||
padding-top: rem(0.8); | ||
z-index: 0; | ||
margin-bottom: auto; | ||
@media screen and (min-width: 992px) { | ||
align-items: center; | ||
height: rem(1.6); | ||
border-radius: 2px; | ||
transition: background-color 0.25s, border-color 0.25s; | ||
z-index: 1; | ||
} | ||
input { | ||
// The original checkbox has to be hidden, but still be clickable | ||
// Hence, opacity 0 is used instead of visibility or display | ||
cursor: pointer; | ||
opacity: 0; | ||
z-index: 2; | ||
width: rem(1.5); | ||
height: rem(1.5); | ||
position: absolute; | ||
&:checked + .customCheckbox { | ||
background-image: url(/img/check.svg); | ||
background-position: center; | ||
background-color: var(--colors-greyDark800); | ||
border-color: var(--colors-greyDark800); | ||
} | ||
label { | ||
cursor: pointer; | ||
margin-left: rem(1.5); | ||
} | ||
.checkboxContainer { | ||
position: relative; | ||
width: rem(1.5); | ||
height: rem(1.5); | ||
} | ||
.customCheckbox { | ||
position: absolute; | ||
background-repeat: no-repeat; | ||
display: inline-block; | ||
border: 2px solid var(--ifm-color-emphasis-500); | ||
min-width: rem(1.6); | ||
height: rem(1.6); | ||
border-radius: 2px; | ||
transition: background-color 0.25s, border-color 0.25s; | ||
z-index: 1; | ||
} | ||
input { | ||
// The original checkbox has to be hidden, but still be clickable | ||
// Hence, opacity 0 is used instead of visibility or display | ||
cursor: pointer; | ||
opacity: 0; | ||
z-index: 2; | ||
width: rem(1.5); | ||
height: rem(1.5); | ||
position: absolute; | ||
&:checked + .customCheckbox { | ||
background-image: url(/img/check.svg); | ||
background-position: center; | ||
background-color: var(--colors-coral500); | ||
border-color: var(--colors-coral500); | ||
} | ||
} | ||
} | ||
} | ||
} |
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.