Urara-Blog/node_modules/.pnpm-store/v3/files/6c/da0263a8ad36ac4c500c53a2c44fc48fa99048371c8f4c4ad1e94eaffaa39a9790e64ff137e231597cf26837ba6d7592b77cd0431554a538c6ed3d196c49d8
2022-08-14 01:14:53 +08:00

37 lines
1.5 KiB
Text

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: ()=>_default
});
function _default(_context) {
return (root, result)=>{
let found = false;
root.walkAtRules("tailwind", (node)=>{
if (found) return false;
if (node.parent && node.parent.type !== "root") {
found = true;
node.warn(result, [
"Nested @tailwind rules were detected, but are not supported.",
"Consider using a prefix to scope Tailwind's classes: https://tailwindcss.com/docs/configuration#prefix",
"Alternatively, use the important selector strategy: https://tailwindcss.com/docs/configuration#selector-strategy",
].join("\n"));
return false;
}
});
root.walkRules((rule)=>{
if (found) return false;
rule.walkRules((nestedRule)=>{
found = true;
nestedRule.warn(result, [
"Nested CSS was detected, but CSS nesting has not been configured correctly.",
"Please enable a CSS nesting plugin *before* Tailwind in your configuration.",
"See how here: https://tailwindcss.com/docs/using-with-preprocessors#nesting",
].join("\n"));
return false;
});
});
};
}