- Save script to e.g.
/usr/local/bin/media-query-combiner
chmod +x /usr/local/bin/media-query-combiner
Reads from stdin
and writes to stdout
.
# Require any additional compass plugins here. | |
# Set this to the root of your project when deployed: | |
http_path = "/" | |
css_dir = "css" | |
sass_dir = "css" | |
images_dir = "images" | |
javascripts_dir = "js" |
/** | |
* Setup images sprite having high resolution variant for retina displays. | |
* | |
* It will create class names for all available icons. | |
* | |
* This uses custom function to prefix selectors from array. To get it working you will need to include following snippet in your config.rb | |
* | |
* module Sass::Script::Functions | |
* def prefix_each(array, prefix) | |
* return Sass::Script::String.new array.to_a.map{|item| prefix.value + item.value}.join(", ") |
require 'autoprefixer-rails' | |
require 'breakpoint' | |
require 'scut' | |
require 'sass-media_query_combiner' | |
http_path = "/" | |
sass_dir = "sass" | |
css_dir = "public/css" | |
http_stylesheets_path = "/css" |
@spritePath: '../images/sprite.png'; | |
.sprite(@url: @spritePath, @xpos: 0, @ypos: 0) { | |
background-image: url(@url); | |
background-repeat: none; | |
background-position: @xpos @ypos; | |
} |
// HOW TO USE | |
// | |
// @direction: up; | |
// .class { | |
// .arrow(@direction, #c00, 20px); | |
// } | |
// | |
.arrow(up, @color, @size) { | |
width: 0; |
// ---------------------------------------------------------- | |
// A short snippet for detecting versions of IE in JavaScript | |
// without resorting to user-agent sniffing | |
// ---------------------------------------------------------- | |
// If you're not in IE (or IE version is less than 5) then: | |
// ie === undefined | |
// If you're in IE (>=5) then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: | |
// if (ie) {} |
.ir { | |
font: 0/0 a; | |
text-shadow: none; | |
color: transparent; | |
} |
(function( $ ){ | |
// set up global variables | |
var ObjectName; | |
// Navigation object | |
ObjectName = { | |
method: function() { | |
}, |