Skip to content

Instantly share code, notes, and snippets.

@james0r
Last active April 12, 2020 19:18
Show Gist options
  • Save james0r/7fdea852df50905c58e1257ecdf7a6f1 to your computer and use it in GitHub Desktop.
Save james0r/7fdea852df50905c58e1257ecdf7a6f1 to your computer and use it in GitHub Desktop.
CSS Dropdown - Hide our checkbox input
input[type="checkbox"] {
position: absolute;
width: 100%;
height: 100%;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: 0;
box-shadow: 0px 2px 5px 5px rgba(0,0,0, .3);
transition: box-shadow .5s;
-webkit-appearance: none;
appearance: none;
&:checked {
box-shadow: none;
transition: box-shadow .5s;
}
& + nav {
display: none;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment