Skip to content

Instantly share code, notes, and snippets.



Created Apr 16, 2019
What would you like to do?
:focus-within example
form {
padding: 10px;
position: relative;
overflow: hidden;
form:before {
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.