在 Sass 中更改缩进 [英] Change indentation in Sass

查看:28
本文介绍了在 Sass 中更改缩进的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在使用 Sass 时将输出 CSS 文件中的缩进从 2 个空格更改为 4 个空格?我正在使用扩展样式.我对 Ruby 一无所知,但我尝试在我的计算机上读取 /Library/Ruby/Gems/1.8/gems/sass-3.2.1/ 中的每个 rb 文件.

How can I change indentation from 2 spaces to 4 spaces in output CSS files when using Sass? I'm using expanded style. I don't know anything about Ruby, but I have tried to read every rb file in /Library/Ruby/Gems/1.8/gems/sass-3.2.1/ on my computer.

推荐答案

sass-3.2.3/lib/sass/tree/visitors/to_css.rb 有许多硬编码的双用于缩进的空格字符串 (' ').如果您将它们全部替换为四个空格的字符串,它将按照您的说明编译您的 css.

sass-3.2.3/lib/sass/tree/visitors/to_css.rb has a number of hard-coded double-space strings (' ') that are used for indentation. If you replace them all with four-space strings it will compile your css as you stated.

这篇关于在 Sass 中更改缩进的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆