Permalink
Browse files

Only set media type when one is present

Defaulting to media="screen" causes the
browser to ignore inline @media print
and other queries.

Fixes #612
  • Loading branch information...
1 parent b235734 commit 6b8114035a5d06fe72a5b9d4d0e025d228a2f71c @moshen committed May 26, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/less/browser.js
View
@@ -192,7 +192,7 @@ function createCSS(styles, sheet, lastModified) {
if ((css = document.getElementById(id)) === null) {
css = document.createElement('style');
css.type = 'text/css';
- css.media = sheet.media || 'screen';
+ if( sheet.media ){ css.media = sheet.media; }
css.id = id;
document.getElementsByTagName('head')[0].appendChild(css);
}

0 comments on commit 6b81140

Please sign in to comment.