Skip to content

Commit 68a79b1

Browse files
Suggest bare values for flex-* utilities (#18642)
Fixes tailwindlabs/tailwindcss-intellisense#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.
1 parent 4923042 commit 68a79b1

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Added
11+
12+
- Add suggestions for `flex-<number>` utilities ([#18642](https://github.com/tailwindlabs/tailwindcss/pull/18642))
13+
1014
### Fixed
1115

1216
- Don't consider the global important state in `@apply` ([#18404](https://github.com/tailwindlabs/tailwindcss/pull/18404))

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4197,6 +4197,18 @@ exports[`getClassList 1`] = `
41974197
"fill-transparent/100",
41984198
"fixed",
41994199
"flex",
4200+
"flex-1",
4201+
"flex-2",
4202+
"flex-3",
4203+
"flex-4",
4204+
"flex-5",
4205+
"flex-6",
4206+
"flex-7",
4207+
"flex-8",
4208+
"flex-9",
4209+
"flex-10",
4210+
"flex-11",
4211+
"flex-12",
42004212
"flex-1/2",
42014213
"flex-1/3",
42024214
"flex-1/4",

packages/tailwindcss/src/utilities.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1059,7 +1059,10 @@ export function createUtilities(theme: Theme) {
10591059
}
10601060
})
10611061

1062-
suggest('flex', () => [{ supportsFractions: true }])
1062+
suggest('flex', () => [
1063+
{ supportsFractions: true },
1064+
{ values: Array.from({ length: 12 }, (_, i) => `${i + 1}`) },
1065+
])
10631066

10641067
/**
10651068
* @css `flex-shrink`

0 commit comments

Comments
 (0)