No description
This PR complements #14458 by adding new `shadow-initial` and `inset-shadow-initial` utilities that make it possible to "undo" a custom shadow color and revert to the default shadow color for the current shadow size. For example, in this example the shadow will be red on hover even though the default color for the `shadow` utility is `rgb(0 0 0 / 5%)`: ```html <div class="shadow-sm shadow-red-500 hover:shadow"> <!-- … --> </div> ``` This is usually what you want, but if you actually want `hover:shadow` to apply its default color, you need to know what the color is and add it yourself: ```html <div class="shadow-sm shadow-red-500 hover:shadow hover:shadow-black/5"> <!-- … --> </div> ``` Using `shadow-initial`, you can achieve the same thing without having to know what the original color was: ```html <div class="shadow-sm shadow-red-500 hover:shadow hover:shadow-initial"> <!-- … --> </div> ``` The `inset-shadow-initial` utility does the same thing for the `inset-shadow-*` utilities. --------- Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com> |
||
|---|---|---|
| .github | ||
| crates | ||
| integrations | ||
| packages | ||
| patches | ||
| playgrounds | ||
| scripts | ||
| .gitattributes | ||
| .gitignore | ||
| .npmrc | ||
| .prettierignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CHANGELOG.md | ||
| LICENSE | ||
| package.json | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| README.md | ||
| rust-toolchain.toml | ||
| turbo.json | ||
| vitest.workspace.ts | ||
A utility-first CSS framework for rapidly building custom user interfaces.
Documentation
For full documentation, visit tailwindcss.com.
Community
For help, discussion about best practices, or any other conversation that would benefit from being searchable:
Discuss Tailwind CSS on GitHub
For chatting with others using the framework:
Join the Tailwind CSS Discord Server
Contributing
If you're interested in contributing to Tailwind CSS, please read our contributing docs before submitting a pull request.