This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ compass help imports | |
Usage: compass imports | |
Prints out the imports known to compass. | |
Useful for passing imports to the sass command line: | |
sass -r compass `compass imports` a_file_using_compass.sass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This approach lets you generically memoize any function by changing the call site: | |
@function something-slow-to-compute($arg-1, $arg-2) { | |
@return ... slow calculation ... ; | |
} | |
$cached-values: (); | |
@function cached($function-name, $args...) { | |
$cached-value: map-get($cached-values, ($function-name, $args)); | |
@if $cached-value { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin css-edit-warning { | |
/*! WARNING: This CSS file was generated from a Sass file. Do NOT edit it. */ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%relative { position: relative; } | |
%absolute { position: absolute; } | |
.something { @extend %absolute; } | |
.something-else { @extend %relative; } | |
// Given an html element with class .something and class .something-else | |
// The cascade will resolve to position absolute instead of position relative as you'd expect. | |
// This is because the position aspect of these classes is not an essential inheritance relationship. | |
// It is simply composition -- so only mixins should be used. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82c82 | |
< CONFIG["LIBRUBY_DLDFLAGS"] = "-undefineddynamic_lookup -multiply_definedsuppress -install_name $(libdir)/$(LIBRUBY_SO) -current_version $(MAJOR).$(MINOR).$(TEENY) -compatibility_version $(ruby_version) $(XLDFLAGS)" | |
--- | |
> CONFIG["LIBRUBY_DLDFLAGS"] = "-Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -install_name $(libdir)/$(LIBRUBY_SO) -current_version $(MAJOR).$(MINOR).$(TEENY) -compatibility_version $(ruby_version) $(XLDFLAGS)" | |
125c125 | |
< CONFIG["DLDFLAGS"] = "-undefineddynamic_lookup -multiply_definedsuppress" | |
--- | |
> CONFIG["DLDFLAGS"] = "-Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$journey: (states: complete in-progress current, packets: (strengths: blue, others: green, networking: pink, approach: yellow, coworker: purple)) | |
@function journey-image($state, $packet-color) | |
@if $state == complete | |
@return url('/assets/journey/#{$packet-color}-gem.png') | |
@else | |
@return url('/assets/journey/#{$packet-color}-gem-outline.png') | |
@each $packet, $packet-color in map-get($journey, packets) | |
@each $state in map-get($journey, states) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.3.7) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
$debug-browser-support: true; | |
$svg-gradient-shim-threshold: 1%; | |
@import "compass/css3/images"; | |
div { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Sass::Script::Functions | |
def file_exists(path) | |
return bool(false) unless options[:filename] # not all sass has a file name (e.g. std input) | |
current_directory = File.dirname(options[:filename]) rescue nil # a sass filename from an importer may not be processable by File.dirname | |
return bool(false) unless current_directory && File.exist?(current_directory) # not all sass files are served from the filesystem | |
full_path = File.expand_path(path.value, current_directory) # a relative path will be expanded against the current_directory of the sass file, symlinks will be followed, absolute paths will be left alone. | |
return bool(File.exist?(full_path)) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foo = 1 unless defined?(foo) | |
foo #=> nil | |
FOO = 1 unless defined?(FOO) | |
FOO # => 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import susy | |
@for $i from 1 through 100 | |
.span#{$i} | |
+span($i) |
OlderNewer