compass-sass

Sass @each with multiple variables

末鹿安然 提交于 2019-11-27 03:41:10
I'm just getting started with Sass and Compass, and I'm loving it. Something I'd like to do is take advantage of the @each function to simplify repetitive tasks. However, I've only seen examples of @each inserting one variable, and I'd like to be able to use multiple variables. The standard way (from the Sass Reference ): @each $animal in puma, sea-slug, egret, salamander { .#{$animal}-icon { background-image: url('/images/#{$animal}.png'); } } Which is great, but I'd like to be able to do something like: @each {$animal $color} in {puma black}, {sea-slug green}, {egret brown}, {salamander red}

Merging selectors from mixins

浪尽此生 提交于 2019-11-26 23:19:13
I'm trying to contain general styles/tricks in a separate mixin file which can be applied to any project when they're needed. Some of these styles require multiple elements to work together in order to work. For example: _mixins.scss ==================== @mixin footer_flush_bottom { html { height: 100%; } body { min-height: 100%; position: relative; } #footer { position: absolute; bottom: 0; } } main.scss ==================== @import "mixins"; @include footer_flush_bottom; html { background-color: $bg; //More stuff } body { margin: 0 auto; //More stuff } footer.scss ====================

How to remove the hash from Compass's generated sprite image filenames?

混江龙づ霸主 提交于 2019-11-26 20:00:02
问题 Compass uses chunky_png to render the sprites. It adds a hash to the end of the file to force caches to download the new image sprites. Is there a way to turn this cache busting off? 回答1: Unfortunately asset_cache_buster :none option does not disable adding the hash to the end of the filename. Like I wrote few time ago (in french), Compass has no way to disable the cache hash buster, but I propose a solution. In your configuration file (eg config.rb ) add the following lines: # Make a copy of

IE9 border-radius and background gradient bleeding

余生长醉 提交于 2019-11-26 19:25:13
IE9 is apparently able to handle rounded corners by using the CSS3 standard definition of border-radius . What about support for border radius and background gradient? Yes IE9 is to support them both separately, but if you mix the two the gradient bleeds out of the rounded corner. I am also seeing strangeness with shadows showing as a solid black line under a box with rounded corners. Here are the images shown in IE9: How can I work around this problem? Steve Eisner Here's one solution that adds a background gradient, using a data URI to create a semi-transparent image that overlays any

Using FontAwesome with Sass

微笑、不失礼 提交于 2019-11-26 19:12:22
问题 I'm trying to use FontAwesome in a web Compass project. As there's no specific documentation in the FontAwesome page, and I'm not using Bootstrap, I've followed the "Not using Bootstrap?" directions but can't make it work. The output I get no specific errors, either not found or compiling errors. It's just not showing anything, no icon or text. The FontAwesome font files doesn't seem to be loading. The steps I've done Download the font-awesome directory Copy it to my projects css folder,

Sass and rounding down numbers. Can this be configured?

强颜欢笑 提交于 2019-11-26 18:31:51
问题 Is there any way for me to modify the way that Sass will handle decimal places? I saw a few people saying that Sass will dynamically do the (target/parent)*100 calculation needed for responsive layouts, and output the result at compile time. It even has a percentage function, which will essentially take the two values and do this. Alas, Sass will only ever give me 3 decimal places. My understanding up to this point has been that in some cases, this may not be a sufficient degree of accuracy

Why does “compass watch” say it cannot load sass/script/node (LoadError)?

北城以北 提交于 2019-11-26 17:59:50
问题 I'm having a problem with my compass watch command - it worked fine up until a few days ago. I have made no changes to my config files. I reinstalled Compass, used rvm to update Ruby. I checked my custom_require.rb file but I really don't know what to look for. It seems to be trying to load the file "sass/script/node" somewhere and from http://sass-lang.com/docs/yardoc/Sass/Script/Node.html I gather the filepath - but I have nothing there. /Users/sampurcell/.rvm/rubies/ruby-1.9.3-p194/lib

How to run compass compile without file or line reference?

你离开我真会死。 提交于 2019-11-26 16:55:53
问题 How can I suppress file or line reference such as the commented output line below when running compass compile and possibly keep --output-style expanded by default? /* line 85, ../../../app/stylesheets/simpla/style.sass */ .align-right { float: right; } The problem is whenever I make 1 line change in sass, it makes 50+ line changes to my css to update all the reference line numbers that got adjusted. This makes it really hard to read the actual changes in my git commit. 回答1: Nevermind, just

SASS : making underscore file names actually create css files

最后都变了- 提交于 2019-11-26 14:49:07
问题 By default SASS looks at the filename and determines whether to make a css file out of it. I'm wondering if there is a way to prevent this from happening. We're building a large website and lots of front-end developers are editing the css, but we only have one dev server. Sure some things you can see happen locally, but often you can only see the real rendered way on the server. So, when I push my compiled css file to the server, my co-workers' css gets clobbered until s/he commits and I do

How to overwrite SCSS variables when compiling to CSS

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-26 13:44:35
I'm trying to use jqtouch theming which is based on SASS and COMPASS. I have a file custom.scss with the most simple code, one import and one variable to overwrite: @import 'jqtouch'; // Override variables $base-color: #fe892a;/* The default base which is later used for toolbar, list, and button backgrounds.*/ When I now compile the scss file to css, it will basically just generate the jqtouch css with my filename. The color specification is nowhere to be seen, although the variable is definitley correct per documentation ( Official Guide ) and in the jqtouch.scss file, which I import for