File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
packages/tailwindcss-language-service/src Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -2313,6 +2313,22 @@ export async function resolveCompletionItem(
2313
2313
decls . push ( node )
2314
2314
} )
2315
2315
2316
+ // TODO: Hardcoding this list is really unfortunate. We should be able
2317
+ // to handle this in Tailwind CSS itself.
2318
+ function isOtherDecl ( node : postcss . Declaration ) {
2319
+ if ( node . prop === '--tw-leading' ) return false
2320
+ if ( node . prop === '--tw-duration' ) return false
2321
+ if ( node . prop === '--tw-ease' ) return false
2322
+ if ( node . prop === '--tw-font-weight' ) return false
2323
+
2324
+ return true
2325
+ }
2326
+
2327
+ // We want to remove these decls from details *as long as they're not the only one*
2328
+ if ( decls . some ( isOtherDecl ) ) {
2329
+ decls = decls . filter ( isOtherDecl )
2330
+ }
2331
+
2316
2332
item . detail = await jit . stringifyDecls ( state , postcss . rule ( { nodes : decls } ) )
2317
2333
} else {
2318
2334
item . detail = `${ rules . length } rules`
You can’t perform that action at this time.
0 commit comments