Skip to content

Instantly share code, notes, and snippets.

View gorillawit's full-sized avatar

rspeed gorillawit

  • sunpower
  • Austin TX
View GitHub Profile
@gorillawit
gorillawit / SassMeister-input.scss
Created December 28, 2014 09:11
Generated by SassMeister.com.
// ----
// Sass (v3.4.9)
// Compass (v1.0.1)
// ----
menu{
background: #333;
.menu-item{
float: left;
.menu-link{
@gorillawit
gorillawit / 0_reuse_code.js
Last active August 29, 2015 14:08
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@gorillawit
gorillawit / git commands.sh
Last active August 29, 2015 14:07 — forked from lttlrck/gist:9628955
Git rename a branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@gorillawit
gorillawit / sass-lists.scss
Last active August 29, 2015 13:55
Info on Sass lists
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
// determine list seperator: spaces or commas
$a-list: a b c d e;
$another-list: 1,2,3,4,5;
@gorillawit
gorillawit / parent-selectors.scss
Last active January 2, 2016 13:19
Advanced Sass usage of parent selector (&)
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
//improved ampersands
div{
background: green;
& & {
@gorillawit
gorillawit / new-if-statements.css
Last active January 2, 2016 13:19
New simplified if statements in Sass
.ifStatement {
background: green;
}
div {
background: red;
}
div + div {
background: green;
}
@gorillawit
gorillawit / at-root.css
Last active February 8, 2018 13:37
Using @at-root directory to break nested selectors out of media queries and into the root level
/*
@at-root directory is a global sass function that allows @root can be called from
every nested media. @at-root refers to the base level so @at-root = the root that
all media-queries are bound too. ie for every nested media query, this is the
global style for them. NOW! we get to specify them in the latest Sass release,
@at-root: allows us to jump out of our context this is great if you have one
asset that needs to be different that than the others
*/
@media (min-width: 300px) {
.my-widget .inside-mq {
@gorillawit
gorillawit / menu-with-ie8-exception.css
Last active December 26, 2015 02:39
Sass menu with ie8 exception
menu {
background: #333333;
}
menu .menu-item {
float: left;
}
menu .menu-item .menu-link {
color: blue;
border-right: 1px solid black;
}
@gorillawit
gorillawit / placeholder-extend.css
Last active December 26, 2015 02:29
Using placeholder to show how it can be used to better effect than extend in most cases
.class1, .class2, .class3 {
font-size: 2em;
}
.class3 {
color: green;
}
@gorillawit
gorillawit / placeholders-ifElse-mixins.css
Last active December 26, 2015 02:29
Generated by SassMeister.com.
.my-other-class {
background: url(http://www.placekitten.com/200/200) no-repeat;
}
.my-class {
background: no-kittens;
}
.my-class {
color: green;