Skip to content

Instantly share code, notes, and snippets.

View nonlinear's full-sized avatar

Nicholas Frota nonlinear

View GitHub Profile
@nonlinear
nonlinear / Preferences.sublime-settings
Created October 13, 2012 23:18 — forked from robcowie/Preferences.sublime-settings
SUBLIME: SublimeTODO config
// add before end of brackets
"todo":
{
"file_exclude_patterns":[
"*.po", "*.log", "*.scssc", "*.mo"
],
"folder_exclude_patterns": [
"static", "vendor", "tmp"
],
"patterns":

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

@nonlinear
nonlinear / twitter-bootstrap-ie6.scss
Created November 26, 2012 20:48 — forked from jpmckinney/twitter-bootstrap-ie6.scss
SCSS additions to make Twitter Bootstrap work in IE6
// Assumes you are using <html> conditional classes as described here:
// http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/
.lt-ie7 {
// blockquote small:before{content:'\2014 \00A0';}
blockquote small:before{content:"";}
// [class*="span"]{display:inline;float:left;margin-left:20px;}
.span1{display:inline;float:left;margin-left:20px;}
.span2{display:inline;float:left;margin-left:20px;}
.span3{display:inline;float:left;margin-left:20px;}
.span4{display:inline;float:left;margin-left:20px;}
module Sass::Script::Functions
# Appends "_2x" to the end of a filename before the extension
# e.g. foobar.jpg => foobar_2x.jpg
def retinize(string)
assert_type string, :String
Sass::Script::String.new string.value.gsub(/\.(\w+)$/, '_2x.\\1')
end
declare :retinize, :args => [:string]