Sass mixin uses arguments, if/else, and variable interpolation to update mixin with dynamic background image.
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) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
$imgKey: random(5); | |
$list: apple, banana, cherry, durian, eggplant; | |
$nth: nth($list, $imgKey); |
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.3) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
@mixin quotenote($bgimage: none) { | |
width: 80%; | |
background-color: #333; | |
padding: 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
// ---- | |
// Sass (v3.3.0.rc.2) | |
// Compass (v1.0.0.alpha.17) | |
// ---- | |
$red: red; | |
$FF0000: #FF0000; | |
$fuchsia: fuchsia; | |
$f0f: #f0f; |
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
<table> | |
<tr> | |
<td class="hulk1">70% highlight</td> | |
<td class="hulk2">50% highlight</td> | |
<td class="hulk3">30% highlight</td> | |
<td class="hulk4">$hulk</td> | |
<td class="hulk5">30% shadow</td> | |
<td class="hulk6">50% shadow</td> | |
<td class="hulk7">70% shadow</td> | |
</tr> |
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
<ul class="theme theme--crisp"> | |
<li>#313340</li> | |
<li>#f0f0e3</li> | |
<li>#f9c27b</li> | |
<li>#ef8531</li> | |
<li>#f36519</li> | |
</ul> | |
<ul class="theme theme--funky"> | |
<li>#da0054</li> |
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) | |
// ---- | |
=coloured-flyout($color) | |
border: solid tint($color, 10%) 1px | |
background-color: tint($color, 20%) | |
.flyout |
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) | |
// ---- | |
$width: 18.75em; /* 300px */ | |
$grid-spacing: 2em; | |
.column { margin-right: $width + $grid-spacing*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
// ---- | |
// Sass (v3.3.0.rc.1) | |
// Compass (v0.13.alpha.10) | |
// ---- | |
@mixin flex_percentage($className) { | |
@for $i from 1 through 100 { | |
@if $i % 5 == 0 { | |
.#{$className}#{$i} { | |
width: $i * 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
<h1>Header</h1> |