Skip to content

Instantly share code, notes, and snippets.

@codingdesigner
codingdesigner / _breakpoint-version.scss
Created October 25, 2012 14:37 — forked from kerns/_respond-to-ccmq.md
Conditionally Conjoined Media Queries for Sass (just a proposal, and quite possibly a bad one)
// path to local mixin
@import "../../stylesheets/breakpoint";
// @import "breakpoint";
/* 1. Using Breakpoint to do exactly what you propose */
$breakpoint-default-media: 'only screen';
$break-small: 320px;
$break-medium: 580px;
$break-large: 1234px;
html{
height: 100%;
}
body {
background-color: white;
background-image: -webkit-repeating-linear-gradient(45deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0) 25px, rgba(0, 0, 0, 0.5) 25px, rgba(0, 0, 0, 0.5) 50px);
background-image: -moz-repeating-linear-gradient(45deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0) 25px, rgba(0, 0, 0, 0.5) 25px, rgba(0, 0, 0, 0.5) 50px);
background-image: -o-repeating-linear-gradient(45deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0) 25px, rgba(0, 0, 0, 0.5) 25px, rgba(0, 0, 0, 0.5) 50px);
background-image: -ms-repeating-linear-gradient(45deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0) 25px, rgba(0, 0, 0, 0.5) 25px, rgba(0, 0, 0, 0.5) 50px);
require "rubygems"
require "chunky_png"
require "base64"
module Sass::Script::Functions
def background_noise(c, noise = 0.5, opacity = 0.08, size = 200, mono = false)
# Convert SASS numbers to Ruby classes
noise = noise.to_s.to_f if noise.is_a? Sass::Script::Number