postcss([require('postcss-plugin-namespace')('.insert-selector')]) input .foo{/* Input example */} output .insert-selector.foo{/* Output example */} Options Pass an options object as the second argument. options.ignore Don't prefix specific classes or classes that match a regex. ...
postcss-namespace PostCSS plugin for the scope of name binding. Installation $ npm install postcss-namespace Example // dependenciesvarfs=require("fs")varpostcss=require("postcss")varnamespace=require("postcss-namespace")// css to be processedvarcss=fs.readFileSync("input.css","utf8")// pr...
</template> @component-namespace ga { @b home { @e container { width: 100%; height: 100%; color: #a2eeff; } } } 使用postcss-salad配置后,需要可以渲染成功,但会报错: postcss-custom-properties: variable '--bg-color' is undefined and used without a fallback 然后,再引入插件postcss-...
</template> @component-namespace ga { @b home { @e container { width: 100%; height: 100%; color: #a2eeff; } } } 使用postcss-salad配置后,需要可以渲染成功,但会报错: postcss-custom-properties: variable '--bg-color' is undefined and used without a fallback 然后,再引入插件postcss-...