The idea is based on a gist by @jimbojsb.
You can use Pygments or Highlight.
brew install python
| (function(global) { | |
| function extend(obj) { | |
| for (var i = 1; i < arguments.length; i++) { | |
| var source = arguments[i]; | |
| for (var name in source) if (source.hasOwnProperty(name)) | |
| obj[name] = source[name]; | |
| } | |
| return obj; | |
| } |
The idea is based on a gist by @jimbojsb.
You can use Pygments or Highlight.
brew install python
| svgsprite: { | |
| options: { | |
| padding: 10, | |
| prefix: 'icon', | |
| layout: 'diagonal', // OR 'vertical' OR 'horizontal' | |
| render: { | |
| css: false, | |
| compass: { | |
| template: 'path/to/template.js', | |
| dest: 'path/to/_svg_sprites.scss' |
| // https://coderwall.com/p/yzlqpq | |
| (function($){ | |
| function touch(event) { | |
| event.preventDefault(); | |
| var runFunc = $(this).data('activateRunFunc'); | |
| runFunc && runFunc(); | |
| } | |
| function click(event) { | |
| event.preventDefault(); |
I'm trying to make a horizontal rainbow stripe background gradient mixin, but I feel like this is way too verbose. How can it be better?
Goals:
| # Compass Configuration File | |
| http_path = "/" | |
| css_dir = "." | |
| sass_dir = "sass" | |
| images_dir = "img" | |
| javascripts_dir = "js" | |
| output_style = :compressed | |
| line_comments = false |
| // Just a nice feature, returns another selector in the absence of | |
| // a current one | |
| jQuery.fn.or = function(s) { | |
| return $(this).length? $(this) : $(s); | |
| }; | |
| // Example: | |
| $(".current").or("ul.gallery li:first-child").fadeIn(); |