How to change drawer-overlay bg-opacity to be fully transparent #1057
Answered
by
saadeghi
theaspirational
asked this question in
Q&A
-
|
How to change drawer-overlay bg-opacity to be fully transparent ie. make overlay not visible on drawer-content? |
Beta Was this translation helpful? Give feedback.
Answered by
saadeghi
Aug 27, 2022
Replies: 1 comment
-
|
<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;
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
saadeghi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

drawer-overlayonly 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:
https://play.tailwindcss.com/HveFnBMW82
Or you can change the CSS yourself:
https://play.tailwindcss.com/BehenwI65b?file=css