Skip to content

Instantly share code, notes, and snippets.

View antsa's full-sized avatar

Antti Salonen antsa

  • Kisko Labs
  • Helsinki
View GitHub Profile
@mixin all-retina-sprites($map, $map2x) {
@media (min--moz-device-pixel-ratio: 1.5),
(-o-min-device-pixel-ratio: 3/2),
(-webkit-min-device-pixel-ratio: 1.5),
(min-device-pixel-ratio: 1.5),
(min-resolution: 1.5dppx) {
$base-class: sprite-map-name($map);
.#{$base-class}-all-retina-sprites {
@antsa
antsa / background_noise_function.rb
Created September 7, 2011 12:03 — forked from philippbosch/background_noise_function.rb
Sass implementation of the Noisy jquery plugin: https://github.com/DanielRapp/Noisy
require "chunky_png"
require "base64"
module Sass::Script::Functions
def background_noise(kwargs = {})
opts = {}
Sass::Util.map_hash({
"intensity" => [0..1, "", :Number, Sass::Script::Number.new(0.5) ],
"opacity" => [0..1, "", :Number, Sass::Script::Number.new(0.08)],
"size" => [1..512, "px", :Number, Sass::Script::Number.new(200) ],