Add custom checkbox styles

This commit is contained in:
Linus Groh
2019-10-22 20:19:13 +01:00
parent 31101a9818
commit 50a513d144
+37 -5
View File
@@ -31,6 +31,43 @@ ul {
list-style: inside;
}
input[type="checkbox"] {
appearance: none;
cursor: pointer;
position: relative;
vertical-align: bottom;
&::before {
border: 2px solid var(--color-primary);
border-radius: 4px;
content: "";
display: block;
height: 16px;
width: 16px;
}
&:checked::before {
background: var(--color-primary);
}
&:checked::after {
border-bottom: 2px solid var(--color-primary-text);
border-right: 2px solid var(--color-primary-text);
content: "";
display: inline-block;
height: 10px;
left: 7px;
position: absolute;
top: 3px;
transform: rotate(45deg);
width: 4px;
}
& + label {
cursor: pointer;
}
}
pre {
background: #000;
border-radius: 3px;
@@ -215,11 +252,6 @@ pre {
&:hover {
background: rgba(0, 0, 0, 0.1);
}
input[type=checkbox] {
position: relative;
top: 2px;
}
}
}