Permalink
Browse files

Fixes an issue with IE6-IE8.

  • Loading branch information...
1 parent de0c76e commit fb8fa42ed3d973fb75d44557c91f0aa649650742 @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
@@ -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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -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.
Oops, something went wrong.

0 comments on commit fb8fa42

Please sign in to comment.