Skip to content

Instantly share code, notes, and snippets.

@sxidsvit
Last active May 7, 2018 22:26
Show Gist options
  • Save sxidsvit/01d4e87e5c2280e4fce7852bdc00e4a5 to your computer and use it in GitHub Desktop.
Save sxidsvit/01d4e87e5c2280e4fce7852bdc00e4a5 to your computer and use it in GitHub Desktop.
Checkbox in the form of a circle with a mark in the form of a bird inside
// Non-standard checkbox type: circle + birdie marker
// Подробнее - https://paulund.co.uk/how-to-style-a-checkbox-with-css
input[type="checkbox"] {
position: absolute;
opacity: 0;
+ label {
position: relative;
cursor: pointer;
padding: 0 0 0 22px;
margin-bottom: 0;
opacity: 1;
a {
opacity: 0.3;
}
&:before {
content: '';
position: absolute;
left: 0;
top: 5px;
width: 14px;
height: 14px;
border-radius: 100%;
border: 1px solid #fff;
opacity: 0.3;
background: transparent;
box-shadow:inset 0 2px 3px rgba(0,0,0,.2);
}
&:after {
content: "";
position: absolute;
}
}
&:checked {
+ label:after {
content: "√";
position: absolute;
opacity: 0.7;
color: #fff;
font-size: 24px;
top: -1px;
left: 1px;
}
}
} // end input[type="checkbox"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment