Suggest bare values for flex-* utilities (#18642)

Fixes
https://github.com/tailwindlabs/tailwindcss-intellisense/issues/1426

We weren't suggesting things like `flex-1`. This adds that. I'm not sure
if we want to suggest more `flex-<number>` values though. I've added
1–12 but am open to changing this.
This commit is contained in:
Jordan Pittman 2025-07-30 10:48:26 -04:00 • committed by GitHub
parent 492304212f
commit 68a79b159c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 20 additions and 1 deletions

View file

@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
- Add suggestions for `flex-<number>` utilities ([#18642](https://github.com/tailwindlabs/tailwindcss/pull/18642))
### Fixed
- Don't consider the global important state in `@apply` ([#18404](https://github.com/tailwindlabs/tailwindcss/pull/18404))

View file

@ -4197,6 +4197,18 @@ exports[`getClassList 1`] = `
"fill-transparent/100",
"fixed",
"flex",
"flex-1",
"flex-2",
"flex-3",
"flex-4",
"flex-5",
"flex-6",
"flex-7",
"flex-8",
"flex-9",
"flex-10",
"flex-11",
"flex-12",
"flex-1/2",
"flex-1/3",
"flex-1/4",

View file

@ -1059,7 +1059,10 @@ export function createUtilities(theme: Theme) {
}
})
suggest('flex', () => [{ supportsFractions: true }])
suggest('flex', () => [
{ supportsFractions: true },
{ values: Array.from({ length: 12 }, (_, i) => `${i + 1}`) },
])
/**
* @css `flex-shrink`