Created
August 29, 2025 12:46
-
-
Save brianfeister/9daa1fbbf85c3079276f823a2d3f23bc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Show an item only when an item within the parenthas focus */ | |
.show-on-focus-parent:focus-within .show-on-focus-child { | |
opacity: 1; | |
max-height: 200px; | |
visibility: visible; | |
transform: translateY(0); | |
transition: all 0.2s ease-in-out; | |
} | |
.show-on-focus-child { | |
opacity: 0; | |
max-height: 0; | |
visibility: hidden; | |
transform: translateY(-10px); | |
transition: all 0.2s ease-in-out; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment