compass-sass

ruby sass, unable to resolve dependancies

大城市里の小女人 提交于 2019-12-18 09:24:18
问题 I downloaded two gem files: Sass-3.3.7.gem & compass-0.12.6.gem I ran gem install --local Sass-3.3.7.gem which it installed. Followed by the same command for compass , but got the error: unable to resolve dependencies: compass requires sass (~>3.2.19) I'm installing them pre-downloaded as I have no connection. Anyone knows what can be the solution? 回答1: Compass 0.12.6 apparently depends on sass ~>3.2.19, which means that the version of sass should be bigger than 3.2 and smaller than 3.3, so

Compass Source in Multiple Directories

孤街浪徒 提交于 2019-12-18 09:09:00
问题 Have you had success compiling SASS in multiple directories? Can you set up compass to recursively watch a directory? I have read the documentation on add_import_path, but I would really appreciate some sample code, as I have (I am fairly certain) never written a line of ruby code. The reason I ask is that I have several projects that share some standard scss. I would like changes to the shared scss to cascade to all projects. thanks. 回答1: Let's say you have the following directroy structure:

Import SASS file from database instead of filesystem

旧城冷巷雨未停 提交于 2019-12-18 08:48:26
问题 I don't have much experience with Ruby. I want to @import sass from database instead of filesystem. I did not find any examples online. How should I go about implementing this. I see that I have to extend an importer class but since I have no understanding of ruby I need to know where in my filesystem does this class reside (Just to check it out) and in general what are the basic steps involved. More information MySQL database contains sass content. So in my web application I accept sass (as

How to modify grunt watch tasks based on the file changed?

给你一囗甜甜゛ 提交于 2019-12-17 19:07:05
问题 I'm writing a node.js program that will watch a directory filled with a large (300-ish) amount of scss projects. Grunt-watch (run either through the node module or on its own, whatever works) will be configured so that whenever a scss file is changed, it will be compiled with compass, the output file moved to a separate directory, for example: ./1234/style.scss was changed >> grunt-watch runs grunt-compass >> /foo/bar/baz/1234/style.css updated The project directory that the file was in is

Use variable defined in config.rb in scss files

微笑、不失礼 提交于 2019-12-17 18:46:17
问题 Is it possible to use a variable defined in the config.rb file of a compass project, throughout the SCSS files? 回答1: In your config.rb file add a custom module: module Sass::Script::Functions def custom_color(value) rgb = options[:custom][:custom_colors][value.to_s].scan(/^#?(..?)(..?)(..?)$/).first.map {|a| a.ljust(2, a).to_i(16)} Sass::Script::Color.new(rgb) end end And then set up your variables (again, in the config.rb file): sass_options = {:custom => { :custom_colors => {"main" => "

How to generate image sprites in ember-cli using compass?

别等时光非礼了梦想. 提交于 2019-12-17 18:25:53
问题 Update - 20140614: After not getting any answers to this question, or on github, I decided to come up with my own solution to the problem. I was using compass for a number of things, but its main utility was in its ability to generated image sprites. Most other things could be accomplished using pure SCSS. Thus, I wrote broccoli-sprite. This, used in conjunction with ember-cli's built in support for SCSS using broccoli-sass, was able to meet my needs. You can read more about the process here.

Configure compass browser support (Compass 1.x syntax)

女生的网名这么多〃 提交于 2019-12-17 13:38:20
问题 With 0.12.x version of Compass, I was defining support for oldies that way: @import "compass/support" $legacy-support-for-ie6: false; $legacy-support-for-ie7: true; $legacy-support-for-ie8: true; $legacy-support-for-mozilla: false; @if ($legacy-support-for-ie7) { // specific declaration if ie7 is supported } I'm wonder how I should define browser support following Compass 1.x system. Maybe something like that: // Add support for a specific browser $browser-minimum-versions: ( 'ie': "7", 'ie':

Sass import error in Rails 3 app - “File to import not found or unreadable: compass”

戏子无情 提交于 2019-12-17 10:57:31
问题 I have a Rails 3 app on which I successfully ran compass init rails ./ --using blueprint . I can @import files from the /stylesheets directory, but I get an error when I try to @import compass . Right now the app has two simple sass files: common.scss $body-background: blue; main.scss @import "common"; //@import "compass"; body { background: $body-background; } With the @import "compass" line commented out, this works -- I get a blue background, so I know Sass is working. If I uncomment the

Sass negative variable value?

て烟熏妆下的殇ゞ 提交于 2019-12-17 08:54:16
问题 I have a couple of scss selectors where I use the same amount positive and negative, as in: padding: 0 15px 15px; margin: 0 -15px 20px -15px; I'd prefer to use a variable for all the 15px amounts, but this does not work: $pad: 15px; padding: 0 $pad $pad; margin: 0 -$pad 20px -$pad; The margin amounts convert to positive numbers. Am I missing something? 回答1: Try it like this margin: 0 (-$pad) 20px (-$pad); 回答2: A more sane solution according to sass guidelines would be to interpolate variables

Can't get sass + compass + susy installed due to version conflict

拟墨画扇 提交于 2019-12-17 05:07:15
问题 I'm working with Sass, Compass and Susy on OSX / Terminal. But I can't get Susy to work together with Sass and Compass. What I've done: sudo gem install sass sass -v Returns: Sass 3.3.0 (Maptastic Maple) sudo gem install compass This seems to also install sass-3.2.14.gem, then the compass-0.12.3.gem. compass -v returns: Compass 0.12.3 (Alnilam) Everything until this point seems to work fine; I can create a Compass project and work with it. Then I try to install Susy: sudo gem install susy -