Skip to content

Commit

Permalink
fix: overrides :root pseudo class
Browse files Browse the repository at this point in the history
  • Loading branch information
fz6m committed Jan 24, 2024
1 parent 2e4cd20 commit 3e74642
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/preset-umi/src/features/overrides/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ export async function transform(cssContent: string, filePath: string) {
} else if (/^body([\s+~>[:]|$)/.test(selector)) {
// use html parent to promote body selector priority
return `html ${selector}`;
} else if (selector === ':root') {
// https://github.com/umijs/umi/issues/12089
return 'html:root';
}
return prefixedSelector;
},
Expand Down

0 comments on commit 3e74642

Please sign in to comment.