compass

compass常用模块(reset、css3、layout篇)

混江龙づ霸主 提交于 2020-01-07 08:34:07
compass内置五大模块:reset、css3、layout、typography、utilities(官网: http://compass-style.org/reference/compass/ ) 1、reset:浏览器样式重置模块,用来减少不同浏览器之间的差异性 reset把对样式的重置封装成了一个又一个的mixin,通过@import "compass/reset/utilities"来引入这些mixin的集合,有时不需要进行全局的样式重置,可以单独重置某一块。 用法: @import "compass/reset/utilities"; @include reset-html5; 可以使用normalize替换掉compass的reset模块 (1)使用包管理工具,npm install normalize.css (2)使用compass的normalize的插件 使用命令行指令“gem install compass-normalize” 这里使用第二种方式: 1.在config.rb中引用插件 require 'compass-normalize' 扩展: <1>require 'compass/import-once/activate'用来设置,在不同代码位置,重复引用时只需一次即可,避免代码冗余。实在需要重复引用时加上“!”即可,如 @import

Why is Sass striping semicolons?

北战南征 提交于 2020-01-07 04:51:32
问题 I'm using Compass to compile a Sass Zen theme. I got this warning: Compass has changed how browser support is configured. The following configuration variables are no longer supported: $legacy-support-for-ie6, $legacy-support-for-ie7, $legacy-support-for-ie8 I installed older versions of compass (0.12.7) sass (3.2.19) breakpoint (1.3) I'm no longer getting the warning, however, I'm losing semicolons in the compiled code. Example: /* Address paddings set differently in IE 6/7. */ menu, ol, ul

compass常用模块(reset、css3、layout篇)

冷暖自知 提交于 2020-01-05 13:55:58
compass内置五大模块:reset、css3、layout、typography、utilities(官网: http://compass-style.org/reference/compass/ ) 1、reset:浏览器样式重置模块,用来减少不同浏览器之间的差异性 reset把对样式的重置封装成了一个又一个的mixin,通过@import "compass/reset/utilities"来引入这些mixin的集合,有时不需要进行全局的样式重置,可以单独重置某一块。 用法: @import "compass/reset/utilities"; @include reset-html5; 可以使用normalize替换掉compass的reset模块 (1)使用包管理工具,npm install normalize.css (2)使用compass的normalize的插件 使用命令行指令“gem install compass-normalize” 这里使用第二种方式: 1.在config.rb中引用插件 require 'compass-normalize' 扩展: <1>require 'compass/import-once/activate'用来设置,在不同代码位置,重复引用时只需一次即可,避免代码冗余。实在需要重复引用时加上“!”即可,如 @import

Group scss and css files into one file with assetic

不想你离开。 提交于 2020-01-04 15:52:49
问题 In a Symfony2 project, I have several css and scss files. I use the compass filter to dump the scss ones and cssrewrite applied to all: {% stylesheets filter='compass, cssrewrite' 'scssFile1.scss' 'scssFile2.scss' %} <link rel="stylesheet" href="{{ asset_url }}"/> {% endstylesheets %} {% stylesheets filter='cssrewrite' 'cssFile1.css' 'cssFile2.css' %} <link rel="stylesheet" href="{{ asset_url }}"/> {% endstylesheets %} I want to group those files into one. I've tried: {% stylesheets filter=

Sass variable declaration precedence

前提是你 提交于 2020-01-03 16:55:17
问题 I am declaring variable of same name in two files. I import them in a following order and found a conflict. FileName: Modal.scss $gray : #e1e1e1; // Imported first FileName: Variable.scss $gray : #999; // imported later Expected behaviour is that Value should be overwritten. However, I am getting First imported value (#e1e1e1) instead of (#999)in CSS. Am I doing the wrong thing declaring variable multiple times? 回答1: Apparently, it will take first variable declaration. For example when you

Sass variable declaration precedence

懵懂的女人 提交于 2020-01-03 16:54:15
问题 I am declaring variable of same name in two files. I import them in a following order and found a conflict. FileName: Modal.scss $gray : #e1e1e1; // Imported first FileName: Variable.scss $gray : #999; // imported later Expected behaviour is that Value should be overwritten. However, I am getting First imported value (#e1e1e1) instead of (#999)in CSS. Am I doing the wrong thing declaring variable multiple times? 回答1: Apparently, it will take first variable declaration. For example when you

Sass watch is detecting changes but not compiling to css

限于喜欢 提交于 2020-01-02 02:43:12
问题 When I run sass --watch app.sass:app.css terminal shows that changes have been detected to sass but won't compile to css. I am using Bourbon so all my .scss and .sass files are imported via mixins. ex. >>> Sass is watching for changes. Press Ctrl-C to stop. >>> Change detected to: css/2-modules/top-nav.scss 回答1: Make sure the file you are saving with an _filename.scss has been properly imported into the mainfile.scss . if you have not imported the _filename.scss it will detect a change but

Windows 7 64-bit: Could not find a valid gem 'compass' (>= 0), here is why: Unable to download data from https://rubygems.org/

亡梦爱人 提交于 2019-12-29 03:11:33
问题 I cannot install compass. I want to install compass on my project so when I try to update, I get this: c:\wamp\www\danjasnowski.com>gem install compass ERROR: Could not find a valid gem 'compass' (>= 0), here is why: Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz) Also.. my current version. c:\wamp\www\danjasnowski.com>gem --version 2.4.1 and irb(main)

Windows 7 64-bit: Could not find a valid gem 'compass' (>= 0), here is why: Unable to download data from https://rubygems.org/

心不动则不痛 提交于 2019-12-29 03:11:04
问题 I cannot install compass. I want to install compass on my project so when I try to update, I get this: c:\wamp\www\danjasnowski.com>gem install compass ERROR: Could not find a valid gem 'compass' (>= 0), here is why: Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz) Also.. my current version. c:\wamp\www\danjasnowski.com>gem --version 2.4.1 and irb(main)

Unable to open Compass after OS X El Capitan (10.11) update

萝らか妹 提交于 2019-12-25 09:20:46
问题 I updated to OS X El Capitan (10.11) and now my grunt script is not working. When I run compass like: compass version I get: Michaels-MacBook-Pro:wnmu thegreyspot$ compass version /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:212:in `initialize': Permission denied - /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-15/2.0.0/nokogiri-1.6.6.2/gem_make.out (Errno::EACCES) from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:212:in `open' from /Library/Ruby/Site/2.0.0/rubygems/ext/builder