Refactoring

This commit is contained in:
2019-10-23 11:18:18 -05:00
parent 032d12aee6
commit ce06bc27a8
9 changed files with 134 additions and 129 deletions

View File

@@ -0,0 +1,76 @@
.CheckBoxOwner {
display: block;
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
/* Customize the label (the container) */
label.CheckBoxLabel {
position: relative;
padding-left: 24px;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
/* Hide the browser's default checkbox */
label.CheckBoxLabel input[type=checkbox] {
position: absolute;
opacity: 0;
cursor: pointer;
height: 0;
width: 0;
}
/* Create a custom checkbox */
.CheckBoxCheckMark {
display: block;
margin: 0;
border-radius: var(--border_radius);
background-color: var(--control_background);
box-sizing: border-box;
position: absolute;
top: 0;
left: 0;
height: 20px;
width: 20px;
}
/* On mouse-over, add a grey background color */
label.CheckBoxLabel:hover input[type=checkbox] ~ .CheckBoxCheckMark {
background-color: var(--control_background_hover);
}
/* When the checkbox is checked, add a blue background */
label.CheckBoxLabel input:checked ~ .CheckBoxCheckMark {
background-color: var(--control_background);
}
/* Create the CheckBoxCheckMark/indicator (hidden when not checked) */
.CheckBoxCheckMark:after {
content: "";
position: absolute;
display: none;
}
/* Show the CheckBoxCheckMark when checked */
label.CheckBoxLabel input:checked ~ .CheckBoxCheckMark:after {
display: block;
}
/* Style the CheckBoxCheckMark/indicator */
label.CheckBoxLabel .CheckBoxCheckMark:after {
left: 6px;
top: 1px;
width: 5px;
height: 10px;
border: solid var(--heading_text_color);
border-width: 0 3px 3px 0;
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
}