Skip to content

Instantly share code, notes, and snippets.

View nonlinear's full-sized avatar

Nicholas Frota nonlinear

View GitHub Profile
@nonlinear
nonlinear / bootstrap_button.html
Last active December 28, 2015 22:59
bootstrap_button
<!-- Options:
loading: data-loading-text="Loading..."
contrast: btn-primary, .btn-success, .btn-info, .btn-warning, .btn-danger, .btn-link
size: .btn-lg, .btn-sm, or .btn-xs
action: .active, .disabled
other: .btn-block, .pull-right, .pull-left -->
<button type="button" class="btn btn-default">[Content]</button>
@nonlinear
nonlinear / _mixins.scss
Created August 9, 2013 22:31
SASS MIXIN: transition
// -----------------------------------------
// TRANSITION
// -----------------------------------------
@mixin transition($prop: all, $time: 300ms, $ease: ease-out) {
-webkit-transition: $prop $time $ease;
-moz-transition: $prop $time $ease;
-ms-transition: $prop $time $ease;
-o-transition: $prop $time $ease;
transition: $prop $time $ease;
}
@nonlinear
nonlinear / _mixins.scss
Created August 9, 2013 20:37
EXTEND SASS: hide text
// -----------------------------------------
// HIDE TEXT
// -----------------------------------------
#hidetext {
font: 0/0 a;
text-shadow: none;
color: transparent;
}
// @extend %hidetext;
@nonlinear
nonlinear / _mixins.scss
Created August 9, 2013 20:36
EXTEND SASS: add ellipsis
// -----------------------------------------
// ADD ELLIPSIS
// -----------------------------------------
%ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
// @extend %ellipsis;
@nonlinear
nonlinear / _mixins.scss
Created August 9, 2013 20:35
SASS EXTEND: reset object
// -----------------------------------------
// RESET OBJECT
// -----------------------------------------
%reset {
margin: 0px !important;
padding: 0px !important;
border: none;
background: transparent;
}
// @extend %reset;
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]
@nonlinear
nonlinear / gist:5271698
Created March 29, 2013 15:51
bootstrap: sample user typeahead
<input type="text" placeholder="Search for user" value="Abel Tuter" data-provide="typeahead" data-source="[&quot;Abel Tuter&quot;,&quot;Adela Cervantsz&quot;,&quot;Aileen Mottern&quot;,&quot;Alejandra Prenatt&quot;,&quot;Alejandro Mascall&quot;,&quot;Alene Rabeck&quot;,&quot;Alfonso Griglen&quot;,&quot;Alissa Mountjoy&quot;,&quot;Allan Schwantd&quot;,&quot;Allie Pumphrey&quot;,&quot;Allyson Gillispie&quot;,&quot;Alva Pennigton&quot;,&quot;Alyssa Biasotti&quot;,&quot;Amelia Caputo&quot;,&quot;Amos Linnan&quot;,&quot;Angelique Schermerhorn&quot;,&quot;Angelo Ferentz&quot;,&quot;Annabelle Coger&quot;,&quot;Annette Frietas&quot;,&quot;Antione Mccleary&quot;,&quot;Antony Thierauf&quot;,&quot;Armando Papik&quot;,&quot;Armando Kolm&quot;,&quot;Ashley Leonesio&quot;,&quot;Athena Fontanilla&quot;,&quot;Audra Cantu&quot;,&quot;Avery Parbol&quot;,&quot;Barbara Hindley&quot;,&quot;Bart Hachey&quot;,&quot;Barton Friesner&quot;,&quot;Benjamin Schkade&quot;,&quot;Bernard Laboy&quot;,&quot;Bert Schadle&quot;,&quot;Berta Karc
DEPRECATED: check bettercanvas _mixins.scss at https://github.com/nonlinear/bettercanvas
@nonlinear
nonlinear / gist:4381353
Created December 26, 2012 16:43
CSS: border-box
-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box; /* Firefox, other Gecko */
box-sizing: border-box; /* Opera/IE 8+ */
@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;}