Skip to content

Commit 536e118

Browse files
Add some missing suggestions in IntelliSense (#15288)
When we renamed the theme keys this got missed Theme keys like `--font-sans` will result in suggestions for `font-sans` again
1 parent 78f5b08 commit 536e118

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2020
- Fix resolution of imported CSS files in Vite SSR builds ([#15279](https://github.com/tailwindlabs/tailwindcss/issues/15279))
2121
- Ensure other plugins can run after `@tailwindcss/postcss` ([#15273](https://github.com/tailwindlabs/tailwindcss/pull/15273))
2222
- Rebase `url()` inside imported CSS files when using Vite with the `@tailwindcss/postcss` extension ([#15273](https://github.com/tailwindlabs/tailwindcss/pull/15273))
23+
- Fix missing font family suggestions in IntelliSense ([#15288](https://github.com/tailwindlabs/tailwindcss/pull/15288))
24+
- Fix missing `@container` suggestion in IntelliSense ([#15288](https://github.com/tailwindlabs/tailwindcss/pull/15288))
2325

2426
## [4.0.0-beta.4] - 2024-11-29
2527

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1593,6 +1593,7 @@ exports[`getClassList 1`] = `
15931593
"-z-30",
15941594
"-z-40",
15951595
"-z-50",
1596+
"@container",
15961597
"@container-normal",
15971598
"absolute",
15981599
"accent-auto",
@@ -3734,6 +3735,7 @@ exports[`getClassList 1`] = `
37343735
"font-light",
37353736
"font-medium",
37363737
"font-normal",
3738+
"font-sans",
37373739
"font-semibold",
37383740
"font-stretch-100%",
37393741
"font-stretch-105%",
@@ -3754,6 +3756,7 @@ exports[`getClassList 1`] = `
37543756
"font-stretch-semi-expanded",
37553757
"font-stretch-ultra-condensed",
37563758
"font-stretch-ultra-expanded",
3759+
"font-superbold",
37573760
"font-thin",
37583761
"forced-color-adjust-auto",
37593762
"forced-color-adjust-none",

packages/tailwindcss/src/intellisense.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ function loadDesignSystem() {
1111
theme.add('--colors-red-500', 'red')
1212
theme.add('--colors-blue-500', 'blue')
1313
theme.add('--breakpoint-sm', '640px')
14+
theme.add('--font-sans', 'sans-serif')
15+
theme.add('--font-weight-superbold', '900')
1416
theme.add('--text-xs', '0.75rem')
1517
theme.add('--text-xs--line-height', '1rem')
1618
theme.add('--perspective-dramatic', '100px')

packages/tailwindcss/src/utilities.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2919,7 +2919,7 @@ export function createUtilities(theme: Theme) {
29192919
suggest('font', () => [
29202920
{
29212921
values: [],
2922-
valueThemeKeys: ['--font-family'],
2922+
valueThemeKeys: ['--font'],
29232923
},
29242924
{
29252925
values: [
@@ -4564,7 +4564,7 @@ export function createUtilities(theme: Theme) {
45644564
{
45654565
values: ['normal'],
45664566
valueThemeKeys: [],
4567-
hasDefaultValue: false,
4567+
hasDefaultValue: true,
45684568
},
45694569
])
45704570

0 commit comments

Comments
 (0)