From bbfeee6b96e81b92c7315f74b32ca98b0fbd9a9a Mon Sep 17 00:00:00 2001 From: MellowCo <799478052@qq.com> Date: Sat, 9 Jul 2022 16:25:58 +0800 Subject: [PATCH] fix: update missing parent rule https://github.com/unocss/unocss/issues/1164 --- src/utils/variants.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/variants.ts b/src/utils/variants.ts index 5a46320..11ff9a7 100644 --- a/src/utils/variants.ts +++ b/src/utils/variants.ts @@ -30,7 +30,10 @@ export const variantParentMatcher = (name: string, parent: string): VariantObjec if (match) { return { matcher: input.slice(match[0].length), - parent, + handle: (input, next) => next({ + ...input, + parent: `${input.parent ? `${input.parent} $$ ` : ''}${parent}`, + }), } } },