Skip to content

Instantly share code, notes, and snippets.

@jesgs
Last active August 22, 2019 15:24
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jesgs/7bc31703abbe7a1cb91c65ee8143ab9c to your computer and use it in GitHub Desktop.
.control-extend {
&__label {
display: none;
@media only screen and (min-width: 768px) {
display: inline-block;
font-weight: 800;
cursor: pointer;
color: black;
&:hover {
text-decoration: underline;
}
}
}
@media only screen and (min-width: 768px) {
&--extended {
max-height: 0;
transition: max-height 0.8s cubic-bezier(0, 0, 0.2, 1);
overflow: hidden;
}
}
&__checkbox {
display: none;
@media only screen and (min-width: 768px) {
display: inline-block;
visibility: hidden;
&:checked {
~ .control-extend--extended {
max-height: 9000px;
transition: max-height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
overflow: visible;
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment