@@ -2304,11 +2304,33 @@ export async function resolveCompletionItem(
23042304 if ( rule . name === 'supports' && rule . params === '(-moz-orient: inline)' ) {
23052305 rule . remove ( )
23062306 }
2307+
2308+ if (
2309+ rule . name === 'supports' &&
2310+ rule . params === '(background-image: linear-gradient(in lab, red, red))'
2311+ ) {
2312+ rule . remove ( )
2313+ }
23072314 } )
23082315
23092316 let ignoredValues = new Set ( [
23102317 'var(--tw-border-style)' ,
23112318 '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))',
23122334 ] )
23132335
23142336 base . walkDecls ( ( node ) => {
@@ -2317,6 +2339,29 @@ export async function resolveCompletionItem(
23172339 decls . push ( node )
23182340 } )
23192341
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+
23202365 item . detail = await jit . stringifyDecls ( state , postcss . rule ( { nodes : decls } ) )
23212366 } else {
23222367 item . detail = `${ rules . length } rules`
0 commit comments