compass-sass

Compass-style (ruby) encoding error

让人想犯罪 __ 提交于 2019-12-08 09:41:39
问题 I just updated Ruby and now I'm getting the following error when trying to start compass: Encoding::CompatibilityError on line ["28"] of /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/sass-3.2.3/lib/sass/tree/visitors/to_css.rb: incompatible character encodings: ASCII-8BIT and UTF-8 What's the problem there? How can it be solved? 回答1: Okay, I could fix it adding encoding = "utf-8" to the "config.rb" file 来源: https://stackoverflow.com/questions/13987010/compass-style-ruby-encoding

SASS: content block mixin (or placeholder) that takes contextual selectors and appends them to selector in mixin

与世无争的帅哥 提交于 2019-12-08 07:02:45
问题 I want to do something like this: @mixin context($size) { body.#{$size} { @content } } div { span { font-size: 2em; @include context('large') { & { font-size: 5em; } } } } To produce: div span { font-size: 2em; } body.large div span { font-size: 5em; } What it ACTUALLY (predictably) produces: div span { font-size: 2em; } div span body.large { font-size: 5em; } I could just replicate the selectors inside different mixins, but given that selectors could be complex that's a lot of extra junk:

Compass: How to reference to different sprites with identical folder names?

烈酒焚心 提交于 2019-12-08 05:45:28
问题 Suppose we have 2 sprite folders inside the img folder of a standard Compass project. Inside each one of them, we have other 2 folders with identical names: project/img/chapter1/icons project/img/chapter2/icons We know Compass uses the last folder name so as to reference to the sprite. But, in this case, how could one call each one of them? 回答1: Don't use the magic, use the helpers: $icons1-sprite: sprite-map("project/img/chapter1/icons/*.png"); $icons2-sprite: sprite-map("project/img

Compass compile error on Sencha Touch 2.2.1, undefined $font-family value and mixin problems

点点圈 提交于 2019-12-08 05:33:58
问题 Using this tutorial with Sencha Touch 2.2.1, I'm not able to compile my project because of an undefined $font-family variable: error application.scss (Line 2 of _Class.scss: Undefined variable: "$font-family".) Sass::SyntaxError on line ["2"] of /Users/mac/Sites/apps/MyApp/touch/resources/themes/stylesheets/sencha- touch/default/src/_Class.scss: Undefined variable: "$font-family". Does anyone have an idea how to solve this? Note: This was a bug in the previous version (Sencha Touch 2.2).

Windows 10 64-bit: ERROR: Could not find a valid gem 'compass' (>= 0), here is why:

隐身守侯 提交于 2019-12-08 03:55:07
问题 I'm trying to install ruby in windows 10. For install compass & SASS but I'm unable to install this I tried all the things I know it & as per various question answer from various website including stack overflow. set SSL_CERT_FILE=C:\RailsInstaller\cacert.pem or set SSL_CERT_FILE= curl.haxx.se/ca/cacert.pem gem install compass Received Following Error Message: ERROR: Could not find a valid gem 'compass' (>= 0), here is why: Unable to download data from https://rubygems.org/ - SSL_connect

Compass / Sass check if file exists

[亡魂溺海] 提交于 2019-12-08 02:13:44
问题 I'm using compass to generate sprites and a have a mixin that calculates the width and height of the original asset and adds that into the css. I also have an option on this mixin to pass in true or false for hover state images. But rather than having to specify this each time I use the mixin I'd like to add the hover css by default if the file exists. I've added the following to my config.rb file (thus far its the only extension I have) module Sass::Script::Functions def file_exists(image

What does @include container mean?

巧了我就是萌 提交于 2019-12-07 23:33:07
问题 I am getting started with Compass and Susy. My goal is to make my layout adapt to phone, tablet, and desktop screen sizes. In the Susy examples (susy.oddbird.net or SO question), there is a pattern of having the number of columns adapt to the screen size. Specifically, there are nested rules like these: .container { @include container; @include desktop { @include container; } } My questions now: What does the container { @include container } do? And, why is it nested again in the desktop

Browser support for text-shadow spread value

大兔子大兔子 提交于 2019-12-07 19:17:09
问题 Seen discussions here but it has been 2 years! I don't know if I'm using this right but I have the following sass/compass code: +text-shadow(red 0 3px 0 3px) Generating the following css : text-shadow: red 0 3px 3px, red 0 3px 0 3px; text-shadow: red 0 3px 0 3px, red 0 3px 0 3px; Which not works in neither Chrome/Safari/Firefox/Opera. Is this something with the declaration or this spread feature was really removed from specs? 回答1: It says in the specs that, This property accepts a comma

How to get desired color from base color in SASS

房东的猫 提交于 2019-12-07 18:00:30
问题 I want to have one base color and want to built dynamic color palate for my website so it becomes as easy to switch themes as changing a color value. SASS has so many helper function which I believe enough to get me there. The problem I am facing here is in order to get to desired color value from that single base color, what function (or combination of functions) with what value shall I use. There is this amazing tool http://sassme.arc90.com/ , which lets you play with various combinations

Getting Susy and Compass installed with ruby on rails

无人久伴 提交于 2019-12-07 16:08:46
问题 I'm just starting with ruby on rails and one of the first things I tried to do was install the gems compass and susy. After figuring out that I needed to include them in the gemfile (I'm using RubyMine and thought it would do it for me), I still got a missing "Could not find", "susy" error when I tried to import susy into one of my css.scss files. I have ruby version 1.9.3 (194) and ruby gems version 1.8.23 Any help on which gems (and versions) I need in my bundle, how to make sure they get