From b1fd9e28b6532180860080d9ebbec10469e45628 Mon Sep 17 00:00:00 2001 From: MellowCo <799478052@qq.com> Date: Sat, 9 Jul 2022 15:25:50 +0800 Subject: [PATCH] Fix missing ::backdrop preflight --- src/preflights.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/preflights.ts b/src/preflights.ts index 54cee81..76b2c2c 100644 --- a/src/preflights.ts +++ b/src/preflights.ts @@ -8,8 +8,10 @@ export const preflights: Preflight[] = [ { layer: 'preflights', getCSS(ctx: PreflightContext) { - if (ctx.theme.preflightBase) - return `${wxPerfix},::before,::after{${entriesToCss(Object.entries(ctx.theme.preflightBase))}}` + if (ctx.theme.preflightBase) { + const css = entriesToCss(Object.entries(ctx.theme.preflightBase)) + return `*,::before,::after{${css}}::backdrop{${css}}` + } }, }, ]