Skip to content

Commit 61c3718

Browse files
Add color to form reset snippet (#15064)
While testing the latest alpha release across Tailwind v3 projects, we noticed one regression in relation to the default color of `<button>` elements. In v3, the reset would change the default to `inherit` but in v4 we would _not include it in the reset snippet inserted by the upgrade too_. This PR changes the upgrade snippet to include it: ```diff /* In Tailwind CSS v4, basic styles are applied to form elements by default. To maintain compatibility with v3, the following resets have been added: */ @layer base { input, textarea, select, button { border: 0px solid; border-radius: 0; padding: 0; + color: inherit; background-color: transparent; } } ``` This PR also ensures that there's a newline between the two code snippets. ## Test Plan ### Before ![image](https://github.com/user-attachments/assets/00b5ea23-a6f2-4f7c-93c9-62aac841ce97) ### After <img width="1354" alt="Screenshot 2024-11-21 at 15 42 58" src="https://github.com/user-attachments/assets/9a4503fe-683f-4d08-abf2-7dd111ed5428">
1 parent a56c3a3 commit 61c3718

File tree

9 files changed

+745
-918
lines changed

9 files changed

+745
-918
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10-
- Nothing yet!
10+
### Fixed
11+
12+
- _Upgrade (experimental)_: Include `color` in the form reset snippet ([#](https://github.com/tailwindlabs/tailwindcss/pull/))
1113

1214
## [4.0.0-alpha.36] - 2024-11-21
1315

0 commit comments

Comments
 (0)