Skip to content

Commit 7e20c3b

Browse files
wongjnadamwathan
andauthored
Remove min-w/h-none (#15845)
`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 \| [&lt;length-percentage>](https://www.w3.org/TR/css-values-4/#typedef-length-percentage) \| min-content \| max-content \| fit-content([&lt;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]>
1 parent a8c54ac commit 7e20c3b

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@ 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+
- Remove invalid `min-w/h-none` utilities ([#15845](https://github.com/tailwindlabs/tailwindcss/pull/15845))
1113

1214
## [4.0.0] - 2025-01-21
15+
1316
## [4.0.0-beta.10] - 2025-01-21
1417

1518
### Added

packages/tailwindcss/src/__snapshots__/intellisense.test.ts.snap

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4719,7 +4719,6 @@ exports[`getClassList 1`] = `
47194719
"min-h-lvw",
47204720
"min-h-max",
47214721
"min-h-min",
4722-
"min-h-none",
47234722
"min-h-px",
47244723
"min-h-screen",
47254724
"min-h-svh",
@@ -4767,7 +4766,6 @@ exports[`getClassList 1`] = `
47674766
"min-w-lvw",
47684767
"min-w-max",
47694768
"min-w-min",
4770-
"min-w-none",
47714769
"min-w-px",
47724770
"min-w-screen",
47734771
"min-w-svh",

packages/tailwindcss/src/utilities.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -896,9 +896,7 @@ export function createUtilities(theme: Theme) {
896896
staticUtility(`min-h-screen`, [['min-height', '100vh']])
897897
staticUtility(`max-h-screen`, [['max-height', '100vh']])
898898

899-
staticUtility(`min-w-none`, [['min-width', 'none']])
900899
staticUtility(`max-w-none`, [['max-width', 'none']])
901-
staticUtility(`min-h-none`, [['min-height', 'none']])
902900
staticUtility(`max-h-none`, [['max-height', 'none']])
903901

904902
spacingUtility(

0 commit comments

Comments
 (0)