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
@mixin breakpoint($class) { | |
@if $class == xs { | |
@media (max-width: 767px) { @content; } | |
} | |
@else if $class == sm { | |
@media (min-width: 768px) { @content; } | |
} | |
@else if $class == md { |
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
// default values: | |
$ibThickness: 2px !default; | |
$ibColor: black !default; | |
$ibAlpha: .1 !default; | |
// use a "variable argument" to accept any number of values. | |
@mixin ib($values...) { | |
$borderThickness: $ibThickness; | |
$borderColor: $ibColor; | |
$borderAlpha: $ibAlpha; |
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
// When we give an element some 'attention' | |
@mixin attention() { | |
&:hover, | |
&:active, | |
&:focus { | |
@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
var i = performance.now(); | |
yourFunction(); | |
performance.now() - i; | |
//Or make a helper function, like this: | |
function performanceTest(testFunction, iterations) { | |
'use strict'; | |
var sum = 0; | |
var start = performance.now(); | |
for (var i = 0; i < iterations; i++) { |
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
@import url(http://fonts.googleapis.com/css?family=Gentium+Basic:400italic); | |
body { | |
font: 20px/20px 'Gentium Basic', Tahoma, Verdana, sans-serif; | |
box-sizing: border-box; | |
width: 100%; | |
height: 100%; | |
padding: 2em; | |
color: #eee; | |
background: #c1c2c3 | |
} |
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
<main> | |
<div class="device"> | |
<header></header> | |
<section> | |
<div class="weather time-morning active"> | |
<div class="icon"> | |
<i class="sun"></i> | |
</div> | |
<div class="content"> | |
<h3>Morning</h3> |
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
body { | |
height: 100%; | |
background: #262626; | |
} | |
.hamburger { | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
margin: auto; | |
width: 60px; |
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
// based on titlecapitalization.com | |
!function () { | |
function e(e) { | |
return e; | |
} | |
function t(e) { | |
var t = 0; | |
if (document.selection) { | |
e.focus(); |
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
<section class="slider"> | |
<div class="flexslider"> | |
<ul class="slides"> | |
<li><img src="http://imgur.com/..." alt=""></li> | |
<li><img class="lazy" data-src="http://imgur.com/..." alt=""></li> | |
<li><img class="lazy" data-src="http://imgur.com/..." alt=""></li> | |
<li><img class="lazy" data-src="http://imgur.com/..." alt=""></li> | |
<li><img class="lazy" data-src="http://imgur.com/..." alt=""></li> | |
</ul> | |
</div> |
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
setInterval(function () { | |
'use strict'; | |
var d = new Date(), | |
h = d.getHours(), | |
m = d.getMinutes(), | |
s = d.getSeconds(); | |
document.body.textContent = [h, m, s].map(function (a) { return a < 10 ? '0' + a : a}).join(':'); | |
document.body.style.background = 'hsl(' + ~~(s * 6) + ', ' + ~~(m * 10/6) + '%, ' + ~~(h * 25/6) + '%)'; |