{
line = $0
while (match(line, /^(.*)spacing\(([0-9\.]+)\)(.*)$/, groups)) {
line = groups[1] "SPACING(" (groups[2] * 2) ")" groups[3]
}
gsub(/SPACING/, "spacing", line)
print line
}
The mandelbrot algorithm in SCSS.
A Live example by Gregor Adams
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
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
// ---- | |
// Sass (v3.3.0.rc.1) | |
// Compass (v0.13.alpha.10) | |
// ---- | |
@import "compass"; | |
$map: ( | |
animation: foo 1s infinite, | |
width: 200px, |
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.0.rc.1) | |
// Compass (v0.13.alpha.10) | |
// ---- | |
// Transform a value into rem | |
// Assuming baseline is set to 10px on :root/html | |
@function rem($value, $baseline: 10px) { | |
@if type-of($value) == list { | |
$result: (); |
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
@function add-grid($grid-definition) { | |
$grid-split: split_string($grid-definition, 'at'); | |
$number: to-number(nth($grid-split, 2)); | |
@debug $number; | |
@debug type-of($number); | |
@return $number; | |
} | |
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
def split_string(string, key) | |
items = string.value.split(" " + key.value + " ") | |
if items.count == 1 | |
Sass::Script::Bool.new(false) | |
else | |
Sass::Script::List.new(items.map{|i| Sass::Script::String.new(i), :comma) | |
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
$test:(); | |
@for $i from 0 through 5 { | |
$test: append($test, a b, comma); | |
} | |
@debug $test; | |
@debug nth($test, 1); | |
@debug nth(nth($test, 1),2); |
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 filter( $var ) | |
-webkit-filter: $var | |
-moz-filter: $var | |
-ms-filter: $var | |
-o-filter: $var | |
filter: $var | |
a | |
&.on | |
@include filter( sepia(100%) hue-rotate(33deg) contrast(69%) unquote("saturate(2)")) |
NewerOlder