@@ -2304,11 +2304,33 @@ export async function resolveCompletionItem(
2304
2304
if ( rule . name === 'supports' && rule . params === '(-moz-orient: inline)' ) {
2305
2305
rule . remove ( )
2306
2306
}
2307
+
2308
+ if (
2309
+ rule . name === 'supports' &&
2310
+ rule . params === '(background-image: linear-gradient(in lab, red, red))'
2311
+ ) {
2312
+ rule . remove ( )
2313
+ }
2307
2314
} )
2308
2315
2309
2316
let ignoredValues = new Set ( [
2310
2317
'var(--tw-border-style)' ,
2311
2318
'var(--tw-outline-style)' ,
2319
+ 'var(--tw-translate-x) var(--tw-translate-y)' ,
2320
+ 'var(--tw-translate-x) var(--tw-translate-y) var(--tw-translate-z)' ,
2321
+ 'var(--tw-scale-x) var(--tw-scale-y)' ,
2322
+ 'var(--tw-scale-x) var(--tw-scale-y) var(--tw-scale-z)' ,
2323
+
2324
+ // 'var(--tw-rotate-x) var(--tw-rotate-y) var(--tw-rotate-z) var(--tw-skew-x) var(--tw-skew-y)',
2325
+ // 'var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)',
2326
+
2327
+ // 'var(--tw-border-spacing-x) var(--tw-border-spacing-y)',
2328
+ // 'var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)',
2329
+ // 'var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)',
2330
+
2331
+ // 'linear-gradient(var(--tw-gradient-stops))',
2332
+ // 'radial-gradient(var(--tw-gradient-stops))',
2333
+ // 'conic-gradient(var(--tw-gradient-stops))',
2312
2334
] )
2313
2335
2314
2336
base . walkDecls ( ( node ) => {
@@ -2317,6 +2339,29 @@ export async function resolveCompletionItem(
2317
2339
decls . push ( node )
2318
2340
} )
2319
2341
2342
+ // TODO: Hardcoding this list is really unfortunate. We should be able
2343
+ // to handle this in Tailwind CSS itself.
2344
+ function isOtherDecl ( node : postcss . Declaration ) {
2345
+ if ( node . prop === '--tw-leading' ) return false
2346
+ if ( node . prop === '--tw-duration' ) return false
2347
+ if ( node . prop === '--tw-ease' ) return false
2348
+ if ( node . prop === '--tw-font-weight' ) return false
2349
+ if ( node . prop === '--tw-gradient-via-stops' ) return false
2350
+ if ( node . prop === '--tw-gradient-stops' ) return false
2351
+ if ( node . prop === '--tw-tracking' ) return false
2352
+ if ( node . prop === '--tw-space-x-reverse' && node . value === '0' ) return false
2353
+ if ( node . prop === '--tw-space-y-reverse' && node . value === '0' ) return false
2354
+ if ( node . prop === '--tw-divide-x-reverse' && node . value === '0' ) return false
2355
+ if ( node . prop === '--tw-divide-y-reverse' && node . value === '0' ) return false
2356
+
2357
+ return true
2358
+ }
2359
+
2360
+ // We want to remove these decls from details *as long as they're not the only one*
2361
+ if ( decls . some ( isOtherDecl ) ) {
2362
+ decls = decls . filter ( isOtherDecl )
2363
+ }
2364
+
2320
2365
item . detail = await jit . stringifyDecls ( state , postcss . rule ( { nodes : decls } ) )
2321
2366
} else {
2322
2367
item . detail = `${ rules . length } rules`
0 commit comments