自定义 .sass 的格式化输出?

发布于 2024-09-07 12:16:14 字数 217 浏览 5 评论 0原文

#foo {
color:black; }

当从 .sass 生成 .css 文件时,是否有某种选项可以在尾随 } 之前添加换行符?

如果有人提供一个将我正在使用的 sass --watch style.scss:style.css 与换行符要求相结合的示例,我将不胜感激。

#foo {
color:black; }

Is there some sort of option to prefix a newline before the trailing } when a .css file is generated from .sass?

I would appreciate it if someone included an example of combining sass --watch style.scss:style.css, which is what I'm using, along with this newline requirement.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

怀里藏娇 2024-09-14 12:16:14

您可以传递 --style 参数来指定您想要的内容。我认为你想要“扩展”样式:

sass --watch style.scss:style.css --style expanded

请参阅 Sass 文档 适用于不同的输出样式。

You can pass a --style parameter to specify what you want. I think you want the "expanded" style:

sass --watch style.scss:style.css --style expanded

See the Sass documentation for different output styles.

冰雪梦之恋 2024-09-14 12:16:14

我在终端中找到了上述错误的解决方案。如果是这样,您可以尝试以下对我有用的方法。

sass --watch scss:css --style 扩展

I found the above solution to error in the terminal. If so, you can try the below which worked for me.

sass --watch scss:css --style expanded

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文