罗盘编译scss / sass选项,参数和指令

时间:2015-02-04 10:35:13

标签: css compass-sass compass

当我从存储库中检出的某些代码上运行compass compile时,我可以看到我的本地安装确实生成了.css文件的不同输出,而不是之前的编译其他开发人员在不同的时间点使用不同的计算机但具有相同的.scss文件。

示例更改(作为差异):

   margin: 0;
-  background-color: #1D1D1D;
-  -moz-border-radius: 5px;
+  background-color: #1d1d1d;
   -webkit-border-radius: 5px;
+  -moz-border-radius: 5px;
+  -ms-border-radius: 5px;
+  -o-border-radius: 5px;
   border-radius: 5px;
-  color: #fff;
+  color: white;
   display: inline-block;

这个差异显示了某些变化领域:

  1. 扩展前缀:-moz-border-radius旁边添加了-ms--o-的相应前缀指令
  2. 更改hex-color-alpha-case:最近大写(#1D1D1D)现在小写(#1d1d1d
  3. 将十六种颜色更改为命名颜色:最近短和声音(#fff)现在命名为(white
  4. 对于这三点中的每一点,我想从config.rb中给出的指令和注释中了解 指南针 中行为的控制位置我看不到什么是由什么控制的。

    此外,我不知道指南针网站/二进制文件列出了所有可用的配置指令。

    # Require any additional compass plugins here.
    
    # Set this to the root of your project when deployed:
    http_path = "/"
    css_dir = "css"
    sass_dir = "sass"
    images_dir = "images"
    javascripts_dir = "js"
    
    
    # You can select your preferred output style here (can be overridden via the command line):
    # output_style = :expanded or :nested or :compact or :compressed
    
    # To enable relative paths to assets via compass helper functions. Uncomment:
    relative_assets = true
    
    # To disable debugging comments that display the original location of your selectors. Uncomment:
    # line_comments = false
    
    
    # If you prefer the indented syntax, you might want to regenerate this
    # project again passing --syntax sass, or you can uncomment this:
    # preferred_syntax = :sass
    # and then run:
    # sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
    preferred_syntax = :sass
    

0 个答案:

没有答案