Skip to content

Instantly share code, notes, and snippets.

View adion's full-sized avatar

André Dion adion

View GitHub Profile
@chriseppstein
chriseppstein / 0_selector_hacks.scss
Created September 14, 2011 04:27
This gist demonstrates some uses of the new sass feature: Passing content blocks to mixins.
@mixin ie6 { * html & { @content } }
#logo {
background-image: url("/images/logo.png");
@include ie6 { background-image: url("/images/logo.gif"); }
}
@gerardpaapu
gerardpaapu / fps.js
Created August 19, 2011 05:09
FPS counter for every javascript paradigm I could think of...
// Counting frames per second
// ==========================
//
// My basic strategy is to divide the time taken over the
// last n frames and return n seconds / time seconds.
//
// I must provide a method to say that a frame is done, so that
// the time can be recorded and a method to get the current FPS,
// and I must store the last n + 1 (because of the fencepost
// problem) times.

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.

Variables