zoukankan      html  css  js  c++  java
  • (二)sass和compass的配置

    安装完sass和compass后创建工程
    执行编译compass compile
    实时监控sass文件的变换compass watch
    sass文件和scss文件的装换,进入其所在文件夹sass-convert .sass/.scss .scss/sass
    compass create我们会看到几个文件,但在真正的项目中不会使用默认的
    compass create -sass-dir "sass" -css-dir "css" -javascripts-dir "js" -images-dir "img"这样可以在创建的同时自定义文件名
    compass create --bare --sass-dir "sass" --css-dir "css" --javascripts-dir "js" --images-dir "img"
    这个命令只创建sass文件夹而不创建sass里的文件然后一键创建文件mkdir img js css; touch index.html js/main.js js/plugin.js

    理解config.rb

    require 'compass/import-once/activate'

    # Require any additional compass plugins here.
    # (↑的意思)给工程添加插件
    # 使用方法require "susy"
    # Set this to the root of your project when deployed:
    # 把路径设置到工程根目录下
    http_path = "/"
    css_dir = "css"
    sass_dir = "sass"
    images_dir = "img"
    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
    # 嵌套输出风格
    # output_style = :nested
    # #main{
    # color: #999;
    # .content {
    # color: #333;
    # }
    # }
    # #main{
    # color: #999;
    # }
    # #main .content{
    # color: #333;
    # }
    #
    # 紧密输出方式
    # output_style = :compact
    # #main{
    # color: #999;
    # .content {
    # color: #333;
    # }
    # }
    # #main{color: #999; }
    # #main .content{ color: #333; }
    #
    # 压缩输入方式
    # output_style = :compressed
    # #main{
    # color: #999;
    # .content {
    # color: #333;
    # }
    # }
    # #main{color: #999; } #main .content{ color: #333; }
    #
    # To enable relative paths to assets via compass helper functions. Uncomment:
    # (↑的意思)通过compass帮助工具打开资源相对路径功能,去掉前面的#
    # 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

  • 相关阅读:
    【js】数据表格开启同比化显示,增加对比性
    Kotlin 使用协程编写高效的并发程序
    Kotlin泛型的高级特性
    kotlin基础
    Java接口和抽象类区别
    Java内存泄漏
    jmeter,注意:您可以通过定义属性resultcollector.action_if_file_exists来避免这个弹出框
    性能测试术语
    jenkins正常显示jmeter的html报告设置
    jmeter: beanshell后置处理程序,清空文件和保存json提取器提取的数据到文件中
  • 原文地址:https://www.cnblogs.com/xiezhe/p/4604879.html
Copyright © 2011-2022 走看看