compass-sass

Adding !important using a Compass Mixin

牧云@^-^@ 提交于 2019-11-29 05:50:50
问题 If I'm using compass for CSS and use a function or mixin like: @include background-image(linear-gradient(#a3cce0, #fff)); is there any easy way to have compass add !important to every line it generates? 回答1: UPDATE : new versions of sass support this syntax now: @include border-radius(5px !important); Just do this (as noted in @naoufal answer). --- old answer --- You can not use !important with compass mixings, but the culprit is not compass, you should blame sass for this. @include border

Sass, Compass, compile all CSS file to one [duplicate]

好久不见. 提交于 2019-11-29 01:52:23
This question already has an answer here: Import regular CSS file in SCSS file? 13 answers Now, while I am developing my project I have three files, "main.css", "about.css" and "news.css" (for example). Is it possible to compile them into one "final.css" for production? hopper The SASS import directive is used to import the contents of one file into another, so you could create a file final.scss whose contents are: @import 'main'; @import 'about'; @import 'news'; You'd then need to rename your files to have "scss" extensions so the import directive will find them. If you don't want the main

Does compass-rails support Ruby on Rails 4.0?

為{幸葍}努か 提交于 2019-11-28 23:53:31
问题 I have clean new Rails 4 app with Gemfile: #default gems gem 'compass-rails' gem 'zurb-foundation' gem 'thin' with style.scss: @import "compass"; @import "foundation/variables"; $red: rgb(255,0,1); $green: rgb(51,153,50); $body-bg: #F4F4F4; $body-font-color: #7B7B7B; $primary-color: #999; $secondary-color: #0CC; $dark-color: #393939; $block-container-border-color: rgb(218,218,218); $block-container-shadow-color: rgb(208,208,208); // main background html{ background:image-url('bckg.jpg'); }

Background images path in Sass and Compass

泪湿孤枕 提交于 2019-11-28 20:41:08
This is mentioned in config.rb file images_dir = "images" I use 2 folder for images in my projects inside images folder images images/background/ images/content/ If any images is inside images/background/ folder then how i should add the path for image in css background and Sass variables? $header-img: "sass.gif"; and background-image: url('sass.gif?1327592426'); And how to get rid of this auto generated ?1327592426 from each background image? You should use the image-url URL helper . It "generates a path to an asset found relative to the project's images directory" which you defined in your

Using Sass compressed output while leaving theme comment header for Wordpress

痞子三分冷 提交于 2019-11-28 20:28:39
How do other Wordpress theme developers incorporate Sass into their theme development while taking advantage of its compressed output style? Sass compressed removes ALL comments, so I currently have an empty style.css with my theme declaration and an @import calling the minified css from compass, but this hardly seems like the best solution. Has anybody found a way around this? What would be the best solution if not? http://codex.wordpress.org/Theme_Development#Theme_Stylesheet http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#id40 SUPER SHORT VERSION: Use /*! loud comments */ and

How to add Compass syntax support to Jetbrains PhpStorm?

你离开我真会死。 提交于 2019-11-28 18:49:24
I'm using JetBrains PhpStorm, which is probably the most epic IDE I've ever used. The question is simple. How do I add Compass syntax support to it? I've got it installed, it renders and works, but PhpStorm still complains about undefined imports and mixins. How can I resolve this? Can Compass be included as an external library? Edit : I'd just like to note that this feature request is for the RubyMine IDE (also by JetBrains), it's not for PhpStorm/WebStorm. It's explanation of Martin's answer. Symlink to compass gem directory in your sass folder works great. Instruction(Windows) open cmd with

How to use compass with rails 3.1

陌路散爱 提交于 2019-11-28 18:37:24
问题 I have searched and searched and all I could see was that to use compass with rails 3.1 was to just edit the Gemfile like so: gem 'compass', :git => 'https://github.com/chriseppstein/compass.git', :branch => 'rails31' gem 'sass-rails', "~> 3.1.0.rc" Yes I understand that but what next? Every tutorial I saw said just that, use that certain fork. But I am still having trouble with using compass with rails 3.1. I did this: $ compass init rails . --syntax sass directory ./app/stylesheets/ create

Compass: generate Sprites, plus width / height on each images in the sprite

筅森魡賤 提交于 2019-11-28 16:49:23
问题 I'm using Compass (a CSS Framework) to generate sprite images. It work, but compass generate only a background-position for each image. Is it possible to get also the width and the height for each image in the sprite? This is my code: @import "ico/*.png"; @include all-ico-sprites; The generated code: .ico-sprite, .ico-bag-blue, .ico-bag-black { background: url('../images/ico-s78b1a1919b.png') no-repeat; } .ico-bag-blue { background-position: 0 0; } .ico-bag-black { background-position: 0

Sass/Compass - Convert Hex, RGB, or Named Color to RGBA

时光总嘲笑我的痴心妄想 提交于 2019-11-28 16:36:56
This may be Compass 101, but has anyone written a mixin which sets the alpha value of a color? Ideally, I would like the mixin to take any form of color definition, and apply transparency: @include set-alpha( red, 0.5 ); //prints rgba(255, 0, 0, 0.5); @include set-alpha( #ff0000, 0.5 ); //prints rgba(255, 0, 0, 0.5); @include set-alpha( rgb(255,0,0), 0.5 ); //prints rgba(255, 0, 0, 0.5); maxbeatty Use the rgba function built into Sass Sets the opacity of a color. Examples: rgba(#102030, 0.5) => rgba(16, 32, 48, 0.5) rgba(blue, 0.2) => rgba(0, 0, 255, 0.2) Parameters: (Color) color (Number)

Count number of selectors in a css file

你说的曾经没有我的故事 提交于 2019-11-28 15:48:51
is there an existing plugin/app/program/script/whatever that analyzes and counts the css selectors of a file? i want to check if the reason my css file is not working in IE is because my selector count is over 4095 (which im pretty sure is not) thanks! p.s. plus points if there's a haml/sass/compass solution jetli13 The following snippet can be run in the Firebug console in Firefox to count the total number of CSS selectors (not just CSS rules) and check whether it reaches the limit of 4095 selectors per stylesheet: var styleSheets = document.styleSheets, totalStyleSheets = styleSheets.length;