Skip to content
Browse files

Fixes an issue with IE6-IE8.

  • Loading branch information...
1 parent de0c76e commit fb8fa42ed3d973fb75d44557c91f0aa649650742 @nathansmith nathansmith committed May 5, 2011
Showing with 14 additions and 10 deletions.
  1. +5 −1 assets/css/master.css
  2. BIN assets/images/h1.png
  3. +8 −8 assets/js/adapt.js
  4. +1 −1 assets/js/adapt.min.js
View
6 assets/css/master.css
@@ -5,7 +5,6 @@
----------------------------------------------------------------------------------------------------*/
.container_12 {
-/* padding-top: 10px;*/
padding-bottom: 1px;
}
@@ -114,6 +113,11 @@ pre,
padding: 10px 0 10px 10px;
}
+* html pre {
+ overflow: hidden;
+ width: 97%;
+}
+
code {
background: #ff9;
padding: 0 2px;
View
BIN assets/images/h1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
16 assets/js/adapt.js
@@ -32,7 +32,7 @@
clearInterval(timer);
// Parse browser width.
- var x = w.innerWidth || d.documentElement.clientWidth || d.body.clientWidth || 0;
+ var width = w.innerWidth || d.documentElement.clientWidth || d.body.clientWidth || 0;
// While loop vars.
var arr, arr_0, val_1, val_2, is_range, file;
@@ -62,7 +62,7 @@
val_2 = is_range ? parseInt(arr_0.split('to')[1], 10) : undefined;
// Check for: minimum, maxiumum, range.
- if ((!val_2 && i === last && x > val_1) || (x > val_1 && x <= val_2)) {
+ if ((!val_2 && i === last && width > val_1) || (width > val_1 && width <= val_2)) {
// Built full URL to CSS file.
url = path + file;
break;
@@ -74,18 +74,18 @@
}
// Was it created yet?
- if (url_old && url_old !== url) {
- // If so, just set the URL.
- css.href = url;
- url_old = url;
- }
- else {
+ if (!url_old) {
// If not, set URL and append to DOM.
css.href = url;
url_old = url;
// Use faster document.head if possible.
(d.head || d.getElementsByTagName('head')[0]).appendChild(css);
}
+ else if (url_old !== url) {
+ // If so, just set the URL.
+ css.href = url;
+ url_old = url;
+ }
}
// Fire off once.
View
2 assets/js/adapt.min.js
@@ -1 +1 @@
-(function(a,b,c,d){function m(){clearInterval(g),g=setInterval(l,100)}function l(){clearInterval(g);var c=a.innerWidth||b.documentElement.clientWidth||b.body.clientWidth||0,l,m,n,o,p,q,r=j,s=j-1;while(r--){l=i[r].split("="),m=l[0],q=l[1].replace(/\s/g,""),p=m.match("to"),n=p?parseInt(m.split("to")[0],10):parseInt(m,10),o=p?parseInt(m.split("to")[1],10):d;if(!o&&r===s&&c>n||c>n&&c<=o){e=h+q;break}e=""}f&&f!==e?(k.href=e,f=e):(k.href=e,f=e,(b.head||b.getElementsByTagName("head")[0]).appendChild(k))}if(!!c){var e,f,g,h=c.path,i=c.range,j=i.length,k=b.createElement("link");k.rel="stylesheet",l(),c.dynamic&&(a.addEventListener?a.addEventListener("resize",m,!1):a.attachEvent?a.attachEvent("onresize",m):a.onresize=m)}})(this,this.document,ADAPT_CONFIG)
+(function(a,b,c,d){function m(){clearInterval(g),g=setInterval(l,100)}function l(){clearInterval(g);var c=a.innerWidth||b.documentElement.clientWidth||b.body.clientWidth||0,l,m,n,o,p,q,r=j,s=j-1;while(r--){l=i[r].split("="),m=l[0],q=l[1].replace(/\s/g,""),p=m.match("to"),n=p?parseInt(m.split("to")[0],10):parseInt(m,10),o=p?parseInt(m.split("to")[1],10):d;if(!o&&r===s&&c>n||c>n&&c<=o){e=h+q;break}e=""}f?f!==e&&(k.href=e,f=e):(k.href=e,f=e,(b.head||b.getElementsByTagName("head")[0]).appendChild(k))}if(!!c){var e,f,g,h=c.path,i=c.range,j=i.length,k=b.createElement("link");k.rel="stylesheet",l(),c.dynamic&&(a.addEventListener?a.addEventListener("resize",m,!1):a.attachEvent?a.attachEvent("onresize",m):a.onresize=m)}})(this,this.document,ADAPT_CONFIG)

0 comments on commit fb8fa42

Please sign in to comment.
Something went wrong with that request. Please try again.