This file contains hidden or 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
$width-sm: 400px; | |
$width-md: 1000px; | |
$width-lg: 1600px; | |
@mixin breakpoint($mq) { | |
@if $mq == small { | |
@media (min-width: $width-sm) { @content } | |
} | |
@else if $mq == medium { | |
@media (min-width: $width-md) { @content } |
This file contains hidden or 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
/* Colors */ | |
/* http://chir.ag/projects/name-that-color */ | |
$lime: #b0eb00; | |
$bright-red: #b30015; | |
$dark-blue: #2a00b3; | |
$deep-cerulean: #0077b3; | |
$bondi-blue: #00b0b3; | |
$cyan: #24fbff; | |
$heliotrope: #8a7dff; | |
$silver-chalice: #a6a6a6; |
This file contains hidden or 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
// ---------------------------------------------------- | |
// absolute positioning | |
// ---------------------------------------------------- | |
// Although it’s not particularly hard to absolutely | |
// position an element with CSS, you can save a lot of | |
// time with this mixin. It allows you to quickly | |
// specify values for the four directions: | |
// top, right, bottom, and left. |
This file contains hidden or 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
```css | |
selector { | |
color: #000000; | |
background: #ffffff77 | |
} | |
``` | |
/* | |
- Instead of using rgba() you can use #00000078, the last two digits are the alpha value 00-ff | |
- [1 2 3 4 5 6 7 8 9 A B C D E F] |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
This file contains hidden or 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 that runs and counts children inside a parent | |
function getCount(parent, getChildrensChildren){ | |
var relevantChildren = 0; | |
var children = parent.childNodes.length; | |
for(var i=0; i < children; i++){ | |
if(parent.childNodes[i].nodeType != 3){ | |
if(getChildrensChildren) | |
relevantChildren += getCount(parent.childNodes[i],true); | |
relevantChildren++; | |
} |
NewerOlder