Skip to content

Instantly share code, notes, and snippets.

@justmarkup

justmarkup/style.css

Created Apr 16, 2019
Embed
What would you like to do?
:focus-within example
form {
padding: 10px;
position: relative;
overflow: hidden;
}
form:before {
content:"";
background: #ddd;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: -1;
transform: translateY(-100%);
transition: transform 260ms ease-out;
}
form:focus-within:before {
transform: translateY(0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.