Skip to content

Commit 5150b4d

Browse files
committed
fix: root selectors to include modal root as well
1 parent 0d9e8bc commit 5150b4d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: src/removeUnsupported.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ module.exports = (options = { debug: false }) => {
5252

5353
// replace :root and :host pseudo selector, introduced in Tailwind 4+ with .ns-root for var handling.
5454
if (rule.selector.includes(":root") || rule.selector.includes(":host")) {
55+
const rootClasses = '.ns-root, .ns-modal';
5556
rule.selectors = rule.selectors.map((selector) =>
56-
selector.replace(/:root/, ".ns-root").replace(/:host/, ".ns-root")
57+
selector.replace(/:root/, rootClasses).replace(/:host/, rootClasses)
5758
);
5859
}
5960

0 commit comments

Comments
 (0)