Skip to content

Commit

Permalink
Remove min-w/h-none (#15845)
Browse files Browse the repository at this point in the history
`none` is not a valid value for `min-width` or `min-height` according to
[the CSS spec](https://www.w3.org/TR/css-sizing-3/#min-size-properties):

> | | |
> | --- | --- |
> | [Value](https://www.w3.org/TR/css-values/#value-defs): | auto \|
[<length-percentage>](https://www.w3.org/TR/css-values-4/#typedef-length-percentage)
\| min-content \| max-content \|
fit-content([<length-percentage>](https://www.w3.org/TR/css-values-4/#typedef-length-percentage))
|

I believe we should be able to remove the `min-w-none` and `min-h-none`
class candidates since they wouldn't have done anything anyway and thus
should not affect backwards compatibility. Indeed, these did not exist
in v3 either:


https://github.com/tailwindlabs/tailwindcss/blob/4f9f603e12b51cc53b8a09c7739b8f88c8eb87eb/stubs/config.full.js#L674-L684


https://github.com/tailwindlabs/tailwindcss/blob/4f9f603e12b51cc53b8a09c7739b8f88c8eb87eb/stubs/config.full.js#L685-L691

---

Credit to `@i` on Discord for spotting this[^1], fixes #15846

[^1]:
https://discord.com/channels/486935104384532500/486935104384532502/1332680061144403968

---------

Co-authored-by: Adam Wathan <[email protected]>
  • Loading branch information
wongjn and adamwathan authored Jan 25, 2025
1 parent a8c54ac commit 7e20c3b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- Nothing yet
### Fixed

- Remove invalid `min-w/h-none` utilities ([#15845](https://github.com/tailwindlabs/tailwindcss/pull/15845))

## [4.0.0] - 2025-01-21

## [4.0.0-beta.10] - 2025-01-21

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4719,7 +4719,6 @@ exports[`getClassList 1`] = `
"min-h-lvw",
"min-h-max",
"min-h-min",
"min-h-none",
"min-h-px",
"min-h-screen",
"min-h-svh",
Expand Down Expand Up @@ -4767,7 +4766,6 @@ exports[`getClassList 1`] = `
"min-w-lvw",
"min-w-max",
"min-w-min",
"min-w-none",
"min-w-px",
"min-w-screen",
"min-w-svh",
Expand Down
2 changes: 0 additions & 2 deletions packages/tailwindcss/src/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -896,9 +896,7 @@ export function createUtilities(theme: Theme) {
staticUtility(`min-h-screen`, [['min-height', '100vh']])
staticUtility(`max-h-screen`, [['max-height', '100vh']])

staticUtility(`min-w-none`, [['min-width', 'none']])
staticUtility(`max-w-none`, [['max-width', 'none']])
staticUtility(`min-h-none`, [['min-height', 'none']])
staticUtility(`max-h-none`, [['max-height', 'none']])

spacingUtility(
Expand Down

0 comments on commit 7e20c3b

Please sign in to comment.