From ee1bb1429eee3fd2247e4f866b31bf5532173128 Mon Sep 17 00:00:00 2001 From: Swapnil Kamble Date: Wed, 23 Oct 2024 11:44:22 +0530 Subject: [PATCH] fix: support for :has() pseudo-class in CSS parser (#13779) --- packages/svelte/src/compiler/types/css.d.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/svelte/src/compiler/types/css.d.ts b/packages/svelte/src/compiler/types/css.d.ts index 97ac7fc0d3a7..05197067bb58 100644 --- a/packages/svelte/src/compiler/types/css.d.ts +++ b/packages/svelte/src/compiler/types/css.d.ts @@ -128,7 +128,11 @@ export namespace Css { export interface PseudoClassSelector extends BaseNode { type: 'PseudoClassSelector'; name: string; - args: SelectorList | null; + /** + * The arguments to the pseudo-class, which can be a SelectorList (e.g. for :has(), :is(), :not(), etc.) + * or can be null for simple pseudo-classes like :hover or :focus + */ + args: SelectorList | ComplexSelector | SimpleSelector | null; } export interface Percentage extends BaseNode {