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 for-size($size) { | |
@if $size == phone-only { | |
@media (max-width: 599px) { @content; } | |
} @else if $size == tablet-portrait-up { | |
@media (min-width: 600px) { @content; } | |
} @else if $size == tablet-landscape-up { | |
@media (min-width: 900px) { @content; } | |
} @else if $size == desktop-up { | |
@media (min-width: 1200px) { @content; } | |
} @else if $size == big-desktop-up { |
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 getBase64FromImage(url, onSuccess, onError) { | |
var xhr = new XMLHttpRequest(); | |
xhr.responseType = "arraybuffer"; | |
xhr.open("GET", url); | |
xhr.onload = function () { | |
var base64, binary, bytes, mediaType; | |
bytes = new Uint8Array(xhr.response); |
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
// -------------------------------------------------- | |
// Flexbox LESS mixins | |
// The spec: http://www.w3.org/TR/css3-flexbox | |
// -------------------------------------------------- | |
// Flexbox display | |
// flex or inline-flex | |
.flex-display(@display: flex) { | |
display: ~"-webkit-@{display}"; | |
display: ~"-ms-@{display}box"; // IE10 uses -ms-flexbox |