(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// ---- | |
// Sass (v3.3.14) | |
// Compass (v1.0.1) | |
// ---- | |
//// | |
// I have written a lot of different `str-replace` Sass functions over | |
// the months yet none of my tries were succeeding in making the new substring | |
// able to contain the one to replace (e.g. `str-replace($str, "a", "ab")`). | |
// Thanks to Valérian Galliat (@valeriangalliat), I finally managed to build |
// ---- | |
// libsass (v3.2.5) | |
// ---- | |
@import "sass-maps-plus"; | |
$map1: ( | |
alpha: ( | |
beta: ( | |
gamma: 3 |
// ---- | |
// Sass (v3.4.14) | |
// Compass (v1.0.3) | |
// ---- | |
@mixin foo($out: false) { | |
@if $out { | |
@at-root { @content; } | |
} | |
} |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// ---- | |
// Sass (v3.4.14) | |
// Compass (v1.0.3) | |
// ---- | |
@function slice($list, $start: 1, $end: length($list), $sep: list-separator($list)) { | |
$output: (); | |
@if $start >= 1 and $end >= $start { | |
@for $i from $start through $end { | |
$output: append($output, nth($list, $i), $sep); |
// ---- | |
// Sass (v3.4.14) | |
// Compass (v1.0.3) | |
// SassyLists (v2.2.1) | |
// ---- | |
@import "SassyLists"; | |
@function last-sels() { | |
$sel: &; $out: (); |
// ---- | |
// Sass (v3.4.14) | |
// Compass (v1.0.3) | |
// sass-maps-plus (ve4d32a1dc2) | |
// ---- | |
@import "sass-maps-plus"; | |
$mixins: (); |
// ---- | |
// Sass (v3.3.14) | |
// Compass (v1.0.3) | |
// ---- | |
@mixin reset($type){ | |
$resets: ( | |
ul: ( | |
list-style: none, | |
margin: 0, |
// ---- | |
// Sass (v3.3.14) | |
// Compass (v1.0.3) | |
// ---- | |
@mixin width($span: 1 1, $options: ()) { | |
@include width-helper(map-merge((span: $span), $options)...); | |
} | |
@mixin width-helper($span: 1 1, $right: null, $left: null, $cycle: null, $out: null) { |
p.red red | |
p.orange orange | |
p.yellow yellow | |
p.green green | |
p.blue1 blue1 | |
p.blue2 blue2 | |
p.purple1 purple1 | |
p.purple2 purple2 |