compass-sass

Compass / Sass check if file exists

十年热恋 提交于 2019-12-06 12:41:49
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_file) path = image_file.value Sass::Script::Bool.new(File.exists?(path)) end end And my mixin looks like

Browser support for text-shadow spread value

只谈情不闲聊 提交于 2019-12-06 07:53:12
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? It says in the specs that, This property accepts a comma-separated list of shadow effects to be applied to the text of the element. Values are interpreted as for ‘box

Compile SASS with Compass in Ant build.xml

主宰稳场 提交于 2019-12-06 07:40:59
问题 Does anyone know how to use JRuby and Compass modules to compile SASS (*.scss) files within build.xml? I'm able to use the Sass::Exec module within sass standalone installation to compile from *.scss to *.css in the following manner: <!-- Compile SCSS files copied to target folder --> <property name="stylesheetFolder" location="myproject/stylesheet"/> <property name="inputFiles" value="${stylesheetFolder}/[^_]*.scss" /> <echo message="Compiling SCSS files from ${stylesheetFolder}..." />

Grunt compass task not compatible with this directory structure?

倖福魔咒の 提交于 2019-12-06 05:11:16
I have the following directory structure (only showing the relevant bits for illustration purposes): proj \ \ Gruntfile.js \ package.json \ test \ (all my tests are in this folder structure) \ app \ \ index.html \ scripts \ (all my scripts are in here) \ views \ (all views are in here) \ styles \ \ style.css \ oldie.css \ print.css \ images \ \ hires \ (all high resolution images are here) \ lowres \ (all low resolution images are here) The compass section of my Gruntfile.js file looks like this: compass: { options: { require: "susy", sassDir: '<%= my.app %>/styles', cssDir: '.tmp/styles',

ruby on rails 3.1 web design

老子叫甜甜 提交于 2019-12-06 04:20:54
May I ask you how to make rails web design more efficient? Is compass plus blueprint the perfect match? Is the current version of compass support rails3.1 Are there any other frameworks that will make rails web deign easier? Thanks Definitely a framework like compass is awesome, it includes a lot of helpers, and provides a good solid base. For form-styling I would recommend using a gem like [formtastic][1], which not only greatly simplifies making forms, but also provides a standard css file. So all needed tags are then known (and can be overwritten if needed). There a few alternatives to

Access the parent selector from within a SASS mixin

[亡魂溺海] 提交于 2019-12-06 02:16:33
问题 I have set up a mixin for a button using display:inline-block. I am trying to get to the parent of whatever class that will eventually end up using the mixim, so I can add the font-size: 0px line there to make sure that I don't need to make adjustments to my HTML to avoid unwanted space between each button. Here's an example... I want the. parent class to receive the font-size: 0px line. @mixin button() { display:inline-block; font-size: 1em; //other stuff to make a pretty button && { font

How to use SASS logic within a CSS 3 media query [duplicate]

佐手、 提交于 2019-12-05 23:39:43
问题 This question already has answers here : Using Sass Variables with CSS3 Media Queries (6 answers) Closed 4 years ago . I'm using saas via the compass framework and the blueprint/grid dependency. I want to be able to set the width of a column using a media query, like so: // /src/partials/_base.scss $blueprint-grid-columns: 18; @media screen and (max-width: 1024px){ // If screen res is 1024 or lower, then set grid width to 46px $blueprint-grid-width: 46px; } @media screen and (max-width:

Getting Susy and Compass installed with ruby on rails

匆匆过客 提交于 2019-12-05 21:34:33
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 in the project bundle, is greatly appreciated. I'm on rails 3.2.7 and use Susy (and Compass) like this.

Fastest way to compile SCSS (Compass) + refresh the browser?

夙愿已清 提交于 2019-12-05 21:11:47
问题 Just wondering what in your opinion is the fastest way to have your SCSS compiled and browser refreshed? I'm currently using LiveReload, but it seems to be a bit slow sometimes, it can take from 1-3sec. It doesn't seem much, but I feel like I'm losing my proper coding pace. What do you guys use? would CodeKit be faster? Or maybe Sublime LiveReload plugin (not the actual app)? Or maybe I should give up Compass and use something else? Any suggestions would be appreciated. PS. I'm on OS X 回答1: I

What is the equivalent of command “Compass watch” for LESS CSS pre-processor?

放肆的年华 提交于 2019-12-05 20:32:37
I was using SASS as CSS pre-processor for Drupal theme. Where in the command line if I use $ compass watch . It keep on watching the change in .scss file and apply to .css file. Just I am trying Bootstrap theme and there I am using LESS CSS pre-processor, Where I have to use $ lessc less/style.less css/style.css every time to apply change. What is the equivalent of $ compass watch for LESS. You need to install less-watch-compiler: npm install -g less-watch-compiler Make sure you installed less globally: npm install -g less In Terminal, navigate to your working directory path and run the