Skip to content

antsa/sassy_noise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sassy noise

A Sass port of Noisy JS (https://github.com/DanielRapp/Noisy) for generating noise background images as base64 data URIs.

Based on work of @philippbosch & @aaronrussell (https://gist.github.com/1021332).

Installation

$ gem install sassy_noise

In your Compass projects config.rb etc:

require "sassy_noise"

Basic usage

In your .scss:

// Default values
// $sassy-noise-intensity-default:  0.5;
// $sassy-noise-opacity-default:    0.08;
// $sassy-noise-size-default:       200;
// $sassy-noise-mono-default:       false;

@import "sassy-noise";

// Example usage on <body>

body {
  @include sassy-noise;
}

// Monochrome example
body {
  @include sassy-noise($mono: true);
}

No templates?

I've omitted the project template because probably no-one wants to build a project based on noise. I might add another pattern later.

Development

To run the project tests run rake in the project home directory.

You need RSpec to run the tests. Easiest way to install RSpec is to run gem install sassy_noise --development which installs the development dependencies.

TODO

  • Add templates
  • Add common case @mixins