Skip to content

Commit d2b5731

Browse files
Intellisense: Add example bare values to border completions (#14370)
Closes tailwindlabs/tailwindcss-intellisense#1048 This PR adds a few bare value examples for border width completions. The examples are taken from [our docs](https://tailwindcss.com/docs/border-width).
1 parent 1e0dfbc commit d2b5731

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818
- Ensure there is always CLI feedback on save even when no new classes were found ([#14351](https://github.com/tailwindlabs/tailwindcss/pull/14351))
1919
- Properly resolve `theme('someKey.DEFAULT')` when all `--some-key-*` keys have a suffix ([#14354](https://github.com/tailwindlabs/tailwindcss/pull/14354))
2020
- Make sure tuple theme values in JS configs take precedence over `@theme default` values ([#14359](https://github.com/tailwindlabs/tailwindcss/pull/14359))
21+
- Improve IntelliSense completions for `border` utilities ([#14370](https://github.com/tailwindlabs/tailwindcss/pull/14370))
2122

2223
## [4.0.0-alpha.23] - 2024-09-05
2324

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

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,6 +667,10 @@ exports[`getClassList 1`] = `
667667
"border/90",
668668
"border/95",
669669
"border/100",
670+
"border-0",
671+
"border-2",
672+
"border-4",
673+
"border-8",
670674
"border-b",
671675
"border-b/0",
672676
"border-b/5",
@@ -689,6 +693,10 @@ exports[`getClassList 1`] = `
689693
"border-b/90",
690694
"border-b/95",
691695
"border-b/100",
696+
"border-b-0",
697+
"border-b-2",
698+
"border-b-4",
699+
"border-b-8",
692700
"border-b-current",
693701
"border-b-current/0",
694702
"border-b-current/5",
@@ -803,6 +811,10 @@ exports[`getClassList 1`] = `
803811
"border-e/90",
804812
"border-e/95",
805813
"border-e/100",
814+
"border-e-0",
815+
"border-e-2",
816+
"border-e-4",
817+
"border-e-8",
806818
"border-e-current",
807819
"border-e-current/0",
808820
"border-e-current/5",
@@ -914,6 +926,10 @@ exports[`getClassList 1`] = `
914926
"border-l/90",
915927
"border-l/95",
916928
"border-l/100",
929+
"border-l-0",
930+
"border-l-2",
931+
"border-l-4",
932+
"border-l-8",
917933
"border-l-current",
918934
"border-l-current/0",
919935
"border-l-current/5",
@@ -1003,6 +1019,10 @@ exports[`getClassList 1`] = `
10031019
"border-r/90",
10041020
"border-r/95",
10051021
"border-r/100",
1022+
"border-r-0",
1023+
"border-r-2",
1024+
"border-r-4",
1025+
"border-r-8",
10061026
"border-r-current",
10071027
"border-r-current/0",
10081028
"border-r-current/5",
@@ -1091,6 +1111,10 @@ exports[`getClassList 1`] = `
10911111
"border-s/90",
10921112
"border-s/95",
10931113
"border-s/100",
1114+
"border-s-0",
1115+
"border-s-2",
1116+
"border-s-4",
1117+
"border-s-8",
10941118
"border-s-current",
10951119
"border-s-current/0",
10961120
"border-s-current/5",
@@ -1193,6 +1217,10 @@ exports[`getClassList 1`] = `
11931217
"border-t/90",
11941218
"border-t/95",
11951219
"border-t/100",
1220+
"border-t-0",
1221+
"border-t-2",
1222+
"border-t-4",
1223+
"border-t-8",
11961224
"border-t-current",
11971225
"border-t-current/0",
11981226
"border-t-current/5",
@@ -1303,6 +1331,10 @@ exports[`getClassList 1`] = `
13031331
"border-x/90",
13041332
"border-x/95",
13051333
"border-x/100",
1334+
"border-x-0",
1335+
"border-x-2",
1336+
"border-x-4",
1337+
"border-x-8",
13061338
"border-x-current",
13071339
"border-x-current/0",
13081340
"border-x-current/5",
@@ -1391,6 +1423,10 @@ exports[`getClassList 1`] = `
13911423
"border-y/90",
13921424
"border-y/95",
13931425
"border-y/100",
1426+
"border-y-0",
1427+
"border-y-2",
1428+
"border-y-4",
1429+
"border-y-8",
13941430
"border-y-current",
13951431
"border-y-current/0",
13961432
"border-y-current/5",

packages/tailwindcss/src/utilities.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2271,7 +2271,7 @@ export function createUtilities(theme: Theme) {
22712271
hasDefaultValue: true,
22722272
},
22732273
{
2274-
values: [],
2274+
values: ['0', '2', '4', '8'],
22752275
valueThemeKeys: ['--border-width'],
22762276
},
22772277
])

0 commit comments

Comments
 (0)