Skip to content

Instantly share code, notes, and snippets.

var runPlugin=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";var r=function(e,t){n(1);var r=e.playerInterface,o=n(5),i=n(162),a=n(163);return{pluginInitialisation:function(){var n;"undefined"!=typeof t&&(e.data=t),n=document.createElement("div"),r.container.appendChild(n),i.render(o.createElement(a,{player:r}),n)}}};e.exports=r},function(e,t,n){var r=n(2);"string"==typeof r&&(r=[[e.id,r,""]]);n(4)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(3)(),t.push([e.id,'.btn{background:none;border:0;margin:0;padding:0;color:#777;cursor:pointer}.btn:active,.btn:focus,.btn:hover{color:#cf3e80}.btn:active .btn__icon,.btn:focus .btn__icon,.btn:hover .btn__icon{fill:#cf3e80}.btn--icon{position:relative;overflow:hidden}.btn--icon .btn__text{position:absolute;left:100%;top:100%}.btn__icon{fill:#777;height:24px;width:24px;disp
@mattjburrows
mattjburrows / SassMeister-input.scss
Created March 30, 2015 13:29
Generated by SassMeister.com.
// ----
// libsass (v3.1.0)
// ----
$responsive: true !default;
$mobile-first: true !default;
$gutter: 8px !default;
{
"versions": [{
"id": "Foo",
"store_id": "Bar",
"type": "Test",
"store_profile": "hd",
"kind": "Store",
"duration": {}
}]
}
@mattjburrows
mattjburrows / _rem.scss
Last active August 29, 2015 14:16
Handle REM values for supporting and non-supporting environments
$ie: false;
$base: 16px;
@function strip-units($number) {
@return $number / ($number * 0 + 1);
}
@function convert-to-pixels($value) {
@if type-of($value) == 'number' {
$stripped: strip-units($value * $base);
<div id="upsell"></div>
<script id="upsell-banner-template" type="x-tmpl-mustache">
<div class="upsell-banner is-hidden" role="banner" aria-labelledby="upsell-title" {{#desc}}aria-describedby="upsell-desc"{{/desc}}>
<div class="upsell-banner__inner">
<div class="upsell-banner__column">
<button class="upsell-banner__dismiss js-upsell-dismiss">&#215;</button>
</div>
<div class="upsell-banner__column">
<img src="http://www.fillmurray.com/64/64" alt="" />
@mattjburrows
mattjburrows / SASS grunt example
Created October 28, 2014 15:10
SASS grunt example
sass: {
development: {
options: {
banner: '<%= config.banner %>',
style: 'nested'
},
src: ['<%= config.sass %>dev.scss'],
dest: '<%= config.css %>screen.css'
},
production: {
@mattjburrows
mattjburrows / Rem mixin
Created October 10, 2014 10:12
Rem mixin
@mixin rem($property, $px, $base: 16px) {
// Convert the baseline into rems
$rem: $base / 1rem;
// Print the first line in pixel values
#{$property}: $px;
// If there is only one (numeric) value, return the property/value line for it.
@if type-of($px) == "number" {
#{$property}: $px / $rem;
}
@else {
@mattjburrows
mattjburrows / app.js (snippet 5.1)
Last active August 29, 2015 13:57
JS code snippets for the "Swipe activated gallery" tutorial on medium. Article URL to be confirmed.
/*
*
* Add the following functions above the var App = {}; declaration.
*
*/
function fetchComputedStyle(el, prop, pseudo) {
return window.getComputedStyle(el, (pseudo || null)).getPropertyValue(prop);
};
function calculateAspectRatio(width, height, ar) {
@mattjburrows
mattjburrows / app.js (snippet 4.1)
Last active August 29, 2015 13:57
JS code snippets for the "Swipe activated gallery" tutorial on medium. Article URL to be confirmed.
/*
*
* Add this under App.animating property declaration.
*
*/
App.SwipeControl = function (opts) {
this.opts = opts;
this._init(opts);
};
App.SwipeControl.prototype.setListeners = function () {
@mattjburrows
mattjburrows / screen.css (snippet 3.1)
Last active August 29, 2015 13:57
CSS code snippets for the "Swipe activated gallery" tutorial on medium. Article URL to be confirmed.
// Gallery specific styles.
.gallery-module {
position: relative;
background-color: #fafafa;
border-bottom: 1px solid white;
}
.gallery-module .gallery-module__wrapper {
*zoom: 1;
}
.gallery-module .gallery-module__wrapper:before,