DEV Community

Discussion on: Write My First Tailwind CSS Plugin

Collapse
phuctm97 profile image
Minh-Phuc Tran Author

Oh, shadow-fill-transparent can't work technically, because the way this plugin works is to create a "virtual" background layer using shadow and place on top of hard-coded browser background, so it has to be a solid color!

The walkaround for you is to use the same color with the underlying element's color instead of using transparent.

Collapse
estubmo profile image
Eirik Mo

What if I have a gradient or an image?

Thread Thread
phuctm97 profile image
Minh-Phuc Tran Author

In that case you’ll have build custom solution, I don’t think this solution can achieve that. Also, as far as I went into this problem, it may be not possible, because on autofill, browser automatically adds an extra background layer that is on top of the typical background and we can’t change color of it