TailwindCSS utility to override background fill color using box-shadow
, is especially useful to style autocompleted form fields with tailwindcss-autofill because background-color
won't work.
yarn add tailwindcss-shadow-fill
Or if you use npm
:
npm i --save tailwindcss-shadow-fill
Add to plugins
in your tailwind.config.js:
module.exports = {
// ...
plugins: [
require("tailwindcss-shadow-fill"),
// Other plugins.
],
variants: {
extend: {
shadowFill: ["dark"], // Enable variants.
},
},
};
Style your components using shadow-fill-{color}
, e.g. shadow-fill-gray-100
, shadow-fill-gray-200
, shadow-fill-red-500
, etc.
<input className="shadow-fill-white dark:shadow-fill-black" />
-
Node.js 12+
-
TailwindCSS 2
Made by @phuctm97.