This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Context mixin | |
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | |
// FOR: Creating contextual styles | |
// Responsive breakpoints, @media contexts, and ascendant classes (like from Modernizr) | |
// WHY: Context is key and shouldn't be afterthought, code organization | |
// USE: context(300px){} context(print){} | |
// context(tablet-landscape){} context(touch){} context(ie7){} | |
@mixin context($values...) { | |
@each $value in $values { | |
$type: type_of($value); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"games": [ | |
{ | |
"game_id": 499, | |
"p1_id": 0, | |
"p2_id": 1, | |
"game_num": 500, | |
"win_p_id": 1, | |
"p1_per_1": 2, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.examples { | |
@include ui-grid; | |
@include ui-grid(2); | |
@include ui-grid(flip); | |
@include ui-grid(2, 2.5%, 60%, 40%); | |
@include ui-grid(2, 2.5%, 60%, 40%, flip); | |
@include ui-grid(3); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin cols($col-num: 2, $width-1: 0, $width-2: 0, $width-3: 0, $width-4: 0, $width-last: 0, $margin-r:5% ) { | |
@include pie-clearfix; | |
$var-list: $col-num, $width-1, $width-2, $width-3, $width-4, $width-last, $margin-r; | |
//Discovers margin option | |
@for $num from 1 through length($var-list) { | |
$value: nth($var-list, $num); | |
@if $num == ($col-num + 2){ | |
@if $num < length($var-list) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
//Note: this isn't a Javascript file. It's a .sublime-settings file | |
//Add whatever you want to user settings, Sublime Text 2 > Preferences > Settings - User | |
//All settings (of which these are copied from) are at Sublime Text 2 > Preferences > Settings - Default | |
// I've read some recent best practice docs that 2-space indentation is better than tabs | |
// This setting translates tab presses to spaces for you | |
// 2 spaces doesn't feel like much though... not sure about this |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@function isElement($name){ | |
//Used MDN for reference list: https://developer.mozilla.org/en-US/docs/Web/HTML/Element | |
$htmlElements: a, abbr, acronym, address, applet, area, article, aside, audio, b, base, basefont, bdi, bdo, bgsound, big, blink, blockquote, body, br, button, canvas, caption, center, cite, code, col, colgroup, data, datalist, dd, decorator, del, details, dfn, dir, div, dl, dt, em, embed, fieldset, figcaption, figure, font, footer, form, frame, frameset, h1, h2, h3, h4, h5, h6, head, header, hgroup, hr, html, i, iframe, img, input, ins, isindex, kbd, keygen, label, legend, li, link, listing, main, map, mark, marquee, menu, menuitem, meta, meter, nav, nobr, noframes, noscript, object, ol, optgroup, option, output, p, param, plaintext, pre, progress, q, rp, rt, ruby, s, samp, script, section, select, small, source, spacer, span, strike, strong, style, sub, summary, sup, table; | |
@if index($htmlElements, $name) == false { | |
@return false; | |
} @else { | |
@return true; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias hideDesktop='defaults write com.apple.finder CreateDesktop -bool false; killall Finder' | |
alias showDesktop='defaults write com.apple.finder CreateDesktop -bool true; killall Finder' |