This file contains hidden or 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.4.9) | |
| // Compass (v1.0.1) | |
| // ---- | |
| @function id-factory() { | |
| @if global-variable-exists('__id-factory__') == false { | |
| $__id-factory__: 0 !global; | |
| } | |
This file contains hidden or 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.4.9) | |
| // Compass (v1.0.1) | |
| // ---- | |
| @function look-and-say($n) { | |
| $sequence: (1); | |
| @for $i from 1 through $n { | |
| $last-entry: nth($sequence, -1); |
This file contains hidden or 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.4.9) | |
| // Compass (v1.0.1) | |
| // ---- | |
| /// Conway's "Look-and-Say" Number in Sass | |
| /// @link http://en.wikipedia.org/wiki/Look-and-say_sequence Wikipedia entry | |
| /// @author Hugo Giraudel | |
| /// @param {List} $step - Current step | |
| /// @return {List} |
This file contains hidden or 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.4.9) | |
| // Compass (v1.0.1) | |
| // ---- | |
| /// Throw $message if $condition is not meant | |
| /// @param {*} $condition - Condition | |
| /// @message {String} $message - Error message | |
| @mixin assert($condition, $message) { | |
| @if not $condition { |
This file contains hidden or 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.4.9) | |
| // Compass (v1.0.1) | |
| // ---- | |
| /// Update a key deeply nested | |
| /// @author Hugo Giraudel | |
| /// @param {Map} $map - Map to update | |
| /// @param {Arglist} $keys - Keys to access to value to update | |
| /// @param {*} $value - New value (last member of `$keys`) |
This file contains hidden or 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.4.9) | |
| // Compass (v1.0.1) | |
| // ---- | |
| @function char($character-code) { | |
| // Detect Sass 3.4 (ugly way) | |
| @if function-exists("selector-append") { | |
| @return unquote("\"\\#{$character-code}\""); | |
| } |
This file contains hidden or 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.4.9) | |
| // Compass (v1.0.1) | |
| // ---- | |
| @function sort-callback($a, $b) { | |
| @return map-get($a, 'id') < map-get($b, 'id'); | |
| } | |
| @function sort($list, $callback) { |
This file contains hidden or 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.4.9) | |
| // Compass (v1.0.1) | |
| // ---- | |
| /// Simple `nth-of-type` for Internet Explorer 7 and 8 | |
| /// @author Hugo Giraudel | |
| /// @param {Number} $n | |
| /// @example scss - Usage | |
| /// li { |
This file contains hidden or 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.4.9) | |
| // Compass (v1.0.1) | |
| // ---- | |
| /// Trim `$string` | |
| /// @param {String} $string - String to trim | |
| /// @return {String} | |
| @function trim($string) { | |
| @return str-slice( |
This file contains hidden or 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
| <!-- | |
| - Styled directly. | |
| --> | |
| <p class="u-color-world">Lorem ipsum dolor sit amet.</p> | |
| <p class="u-color-politics">Lorem ipsum dolor sit amet.</p> | |
| <p class="u-color-tech">Lorem ipsum dolor sit amet.</p> | |
| <p class="u-color-entertainment">Lorem ipsum dolor sit amet.</p> |