简体   繁体   English

建立空的SASS文件

[英]Build empty SASS file

After having create a Sass file, I would like to create a copy of this file with only the structure (only the class and the id, but not the css properties). 创建了Sass文件之后,我想创建一个仅具有结构(仅包括类和id,但不包括css属性)的文件副本。

Is it possible ? 可能吗 ? And how ? 如何 ? Google doesn't help me ... Google帮不了我...

Thanks a lot 非常感谢

If you want to keep your selectors, you can put CSS comment inside your differents blocks. 如果您想保留选择器,可以将CSS注释放入您的differents块中。 They will be present in your compiled stylesheet. 它们将出现在您编译的样式表中。

this-selector {
  // will not be present
}

but-this-one {
  /* will */
}

For an automatic parsing, you should try with postcss and, for exemple, a node.js script. 对于自动解析,您应该尝试使用postcss ,例如,使用node.js脚本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM