Skip to content

Hide the chevron icon by default in dropdown and sho it on hover #2759

Closed Answered by saadeghi
BenaliDjamel asked this question in Q&A
Discussion options

You must be logged in to vote

I wouldn't advise using dropdowns inside each other. It would be confusing for users but anyway,
A quick, easy way would be adding [&>li>details>summary]:after:opacity-0 [&>li>details:hover>summary]:after:opacity-100 class names to the <ul>. The first class sets 0 opacity to the chevron and the second class sets opacity to 1 when <li> is hovered.

Example: https://play.tailwindcss.com/oJd85fnJT7

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@BenaliDjamel
Comment options

@saadeghi
Comment options

Answer selected by saadeghi
@BenaliDjamel
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants