Skip to content
Discussion options

You must be logged in to vote

drawer-overlay only gets opacity value when checkbox is checked so we can have a good fade effect.
to change the background opacity value you can use this crazy class name:

<input id="my-drawer" type="checkbox" class="drawer-toggle [&:checked~.drawer-side>.drawer-overlay]:[--tw-bg-opacity:0]" />

https://play.tailwindcss.com/HveFnBMW82

Or you can change the CSS yourself:

.drawer-toggle:checked ~ .drawer-side > .drawer-overlay{
  --tw-bg-opacity: 0;
}

https://play.tailwindcss.com/BehenwI65b?file=css

Replies: 1 comment

Comment options

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