From 30b1b0d9fcff831f7c4f92952911902f01284b57 Mon Sep 17 00:00:00 2001 From: Marie Alhomme Date: Sat, 23 Aug 2014 14:31:07 +0200 Subject: [PATCH 1/4] update to strajk's last commit Doesn't seem to be breaking anything, so let's incorporate it. --- js/unison.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/js/unison.js b/js/unison.js index 7fa7f23..372b92d 100644 --- a/js/unison.js +++ b/js/unison.js @@ -81,10 +81,16 @@ Unison = (function() { }; win.onresize = util.debounce(breakpoints.update, 100); - doc.addEventListener('DOMContentLoaded', function(){ - unisonReady = win.getComputedStyle(head, null).getPropertyValue('clear') !== 'none'; - breakpoints.update(); - }); + + if (document.readyState == "complete" || document.readyState == "loaded" || document.readyState == "interactive") { + unisonReady = win.getComputedStyle(head, null).getPropertyValue('clear') !== 'none'; + breakpoints.update(); + } else { + doc.addEventListener('DOMContentLoaded', function(){ + unisonReady = win.getComputedStyle(head, null).getPropertyValue('clear') !== 'none'; + breakpoints.update(); + }); + } return { fetch : { @@ -99,4 +105,4 @@ Unison = (function() { } }; -})(); \ No newline at end of file +})(); From 87ea045612fb835887e06c24834e0b8d9a641dfb Mon Sep 17 00:00:00 2001 From: Marie Alhomme Date: Sat, 23 Aug 2014 14:33:17 +0200 Subject: [PATCH 2/4] minify following update --- js/unison.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/unison.min.js b/js/unison.min.js index 704777e..9c8b49b 100644 --- a/js/unison.min.js +++ b/js/unison.min.js @@ -1 +1 @@ -Unison=function(){"use strict";var a,b=window,c=document,d=c.head,e={},f=!1,g={parseMQ:function(a){var c=b.getComputedStyle(a,null).getPropertyValue("font-family");return c.replace(/"/g,"").replace(/'/g,"")},debounce:function(a,b,c){var d;return function(){var e=this,f=arguments;clearTimeout(d),d=setTimeout(function(){d=null,c||a.apply(e,f)},b),c&&!d&&a.apply(e,f)}},isObject:function(a){return"object"==typeof a},isUndefined:function(a){return"undefined"==typeof a}},h={on:function(a,b){g.isObject(e[a])||(e[a]=[]),e[a].push(b)},emit:function(a,b){if(g.isObject(e[a]))for(var c=e[a].slice(),d=0;d Date: Sat, 23 Aug 2014 14:33:52 +0200 Subject: [PATCH 3/4] Update version --- bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bower.json b/bower.json index f34ccb2..0966139 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "Unison", - "version": "0.6.0", + "version": "0.7.0", "homepage": "http://bjork24.github.io/Unison/", "authors": [ "Dan Chilton " From d96e587f7bcfdff3d286fde2a131982265da2240 Mon Sep 17 00:00:00 2001 From: Marie Alhomme Date: Sat, 23 Aug 2014 14:35:55 +0200 Subject: [PATCH 4/4] make scss vars "default" adding " !default" to each variable declaration otherwise you can't easily override them in your own sass variables file --- css/_breakpoints.scss | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/css/_breakpoints.scss b/css/_breakpoints.scss index 0e67c0b..1bbf40d 100644 --- a/css/_breakpoints.scss +++ b/css/_breakpoints.scss @@ -1,14 +1,14 @@ // config -$debug: true; +$debug: true !default; // declare breakpoints -$usn-x-small : 200px; -$usn-small : 400px; -$usn-small-medium : 600px; -$usn-medium : 800px; -$usn-large-medium : 1000px; -$usn-large : 1200px; -$usn-x-large : 1400px; +$usn-x-small : 200px !default; +$usn-small : 400px !default; +$usn-small-medium : 600px !default; +$usn-medium : 800px !default; +$usn-large-medium : 1000px !default; +$usn-large : 1200px !default; +$usn-x-large : 1400px !default; // create sass list to pass media query data // if a breakpoint name changes, remember to @@ -21,7 +21,7 @@ $mq-sync: usn-large-medium $usn-large-medium, usn-large $usn-large, usn-x-large $usn-x-large -; + !default; // build each media query for js ingestion @each $mq in $mq-sync { @@ -63,4 +63,4 @@ body:after { // hide elements for conditional loading // only used for responsive comments plugin -*[data-usn-if] { display: none; } \ No newline at end of file +*[data-usn-if] { display: none; }