compass-sass

Customizing the output of Compass sprites

拈花ヽ惹草 提交于 2019-11-28 12:41:49
I have a top bar menu (that's based on Zurb's Foundation): This is the SCSS: .top-bar { .top-bar-section { ul { @import "menu-icons/*.png"; @include all-menu-icons-sprites; } } } Now, this does what expected, but the problem is that I want to style the a element inside each li elements (actually, I'd like to apply it to .top-bar.topbar-section.ul.li.a:before ). However, since the site is build in WordPress, and so the menu, I can only assign the class to the li element and I have no idea how to make the Compass's spriting work. I know, I could customize the way the menu is rendered by

Compass, config.rb and getting the output actually :compressed

一世执手 提交于 2019-11-28 11:54:19
问题 This is my config.rb preferred_syntax = :sass http_path = '/' css_dir = 'css' sass_dir = 'sass' images_dir = 'assets/images' javascripts_dir = 'js' relative_assets = true line_comments = false output_style = :compressed The thing is that the code won't be compressed, sample of few blocks: /* line 37, ../sass/style.scss */ .ui-state-highlight a, .ui-widget-content .ui-state-highlight a, .ui-widget-header .ui-state-highlight a { color: #363636; } /* line 37, ../sass/style.scss */ .ui-state

Sass/Compass compile into many locations

ⅰ亾dé卋堺 提交于 2019-11-28 11:32:37
I'm using Sass 3.1.10 with Compass 0.11.5. I need to compile my compass project into many diffrent locations (css_dir) due some structural reasons. Currently I compile all files for each path by hand. Is there a way to compile into many locations at the same time? my config.rb looks like this: http_path = "/" css_dir = "skin/main/css" #css_dir = "uc/main/css" #css_dir = "skin/abstract/css" #css_dir = "skin/ksv/css" sass_dir = "sass" images_dir = "images" javascripts_dir = "javascripts" output_style = :compressed preferred_syntax = :sass I wrote a simple shell script to compile to a given path:

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

梦想的初衷 提交于 2019-11-28 09:28:42
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 obviously very important (if grunt-compass sent all the compiled files to the same directory, they would

Unable to compile an existing project because Compass can't find it

血红的双手。 提交于 2019-11-28 09:23:40
问题 I just installed the foundation in my application base directory by executing the following command: compass create myprojectname -r zurb-foundation --using foundation Now I have open the sass/_settings.scss file and I have un-comment the 66th line that is the following: $include-html-classes: true; finaly, I try to compile my foundation project in order to include the html classes by executing the following command: compass compile but I am getting the following result in my command prompt:

Use variable defined in config.rb in scss files

戏子无情 提交于 2019-11-28 08:40:52
Is it possible to use a variable defined in the config.rb file of a compass project, throughout the SCSS files? 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" => "#ff1122"} } } Then in your scss file, you can use the custom_color() function: body { background-color: custom

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

一曲冷凌霜 提交于 2019-11-28 07:15:23
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 . Now I am thus no longer interested in integrating compass into my ember-cli app. As my solution

SCSS/SASS Multiple Sites in Multiple Directories

喜夏-厌秋 提交于 2019-11-28 05:44:22
问题 I'm looking at setting SCSS up on a platform that uses SVN with multiple websites on a team of eight. Our currently site structure is like this. REPO > WEBSITE1 > CSS REPO > WEBSITE2 > CSS REPO > WEBSITE3 > CSS REPO > WEBSITE4 > CSS Is there any way to Make Compass or SASS watch the entire repository (without having to watch / unwatch) each individual website with the config.rb or any other method? Thanks for your help! 回答1: #!/bin/bash for i in repoa repob repoc repod do compass watch "$i

How to import scss file in compass only if it exists?

可紊 提交于 2019-11-28 04:30:30
问题 I need to have special scss file that is different for every installation of the project, so I don't want to include it in git archive. But everything should work even if this file doesn't exist. Is there any way to @import scss file only if it exists, ignoring file not found error? 回答1: You'll need to make use of the "import-path" option to do this, where the path you're importing contains the fallback files you want to import (in our case, we want an empty file). Option 1: Vanilla Sass File

Compass config.rb Location

前提是你 提交于 2019-11-28 00:55:53
问题 I want to add Compass to my existing project. I want to maintain my current project structure, which looks like this (simplified): app/ build/ |-compass/ assets/ |-css/ |-scss |-js/ |-img/ So I want all my SASS files under \assets\css\scss and I want to output the compiled CSS files to \assets\css . Running: compass create --bare --sass-dir "assets\css\scss" --css-dir "assets\css" creates the Compass config.rb file directly under my root. However, I want the file to be under \build\compass .