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
// target IE 10 and 11 with a media query | |
@mixin support-ie-10-11 { | |
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { | |
@content | |
} | |
} | |
// hack for css styles for < ie 9 only | |
@mixin support-ie-9($property, $value) { | |
$property: #{$value + '\0/'}; |
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
const build = () => { | |
return new Promise((resolve, reject) => { | |
compiler.run((err, stats) => { | |
if (err) return reject(err) | |
resolve(stats) | |
}) | |
}) | |
} | |
export { build } |
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 loadImage from 'loadImage' | |
const addImg = (src) => { | |
const imgEl = document.createElement('img') | |
imgEl.src = src | |
document.body.appendChild(imgEl) | |
} | |
const imgArr = [ | |
loadImage('images/cat1.jpg'), | |
loadImage('images/cat2.jpg'), |
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
switch (inputFrequency) { | |
case 1: | |
date = this.nextBillDateIsWithinOneMonth(nextBillDate) ? | |
moment(nextBillDate) : moment(nextBillDate).subtract(1, 'month') | |
break | |
case > initialFrequency: | |
newFrequencyDelta = (inputFrequency - initialFrequency) | |
date = moment(nextBillDate).add(newFrequencyDelta, 'month') | |
break | |
default: |
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
/* usual suspects 👥 */ | |
--blue: blue; /* yep, it's just the truth */ | |
--redpink: #FB2743; /* I saw it on ASOS. I like what they're doing with blue. */ | |
--floralwhite: #fffcf3 #fff floralwhite hsl(45,100,97)rgb(255,252,243); /* I saw it on Cosma Schema. */ | |
/* off the beaten path, but weird and refreshing 👨🎨 */ | |
--lightpurple: #E2D7FE; | |
--cartoonflesh: #FFAEA2; | |
--deeputramarine: #152783; |
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
<!-- android --> | |
<link rel="icon" type="image/png" sizes="192x192" href="/android-chrome-192x192.png"> | |
<link rel="icon" type="image/png" sizes="512x512" href="/android-chrome-512x512.png"> | |
<!-- apple --> | |
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"> | |
<!-- favicon --> | |
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"> | |
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"> | |
<!-- manifest --> | |
<link rel="manifest" href="/manifest.json"> |
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
/* | |
ES5/6 Observer 👀 | |
--- | |
- Like a promise (sort of) but will work in older browsers | |
- With Babel, this will transpile to something very similar to want is written | |
- Note the error | |
- both callback, err will return empty strings by default | |
- bool is false by default | |
*/ | |
const observer = (bool = false, callback = () => '', iterator = 10, maxTime = 300, err = () => '') => { |