don't give style tags a 'title' attribute, it screws things up. [browser]

This commit is contained in:
cloudhead
2010-06-15 02:16:55 -04:00
parent 3c897024ab
commit 372f99bdc5

View File

@@ -107,18 +107,16 @@ function loadStyleSheet(sheet, callback, async) {
}
function createCSS(styles, sheet, lastModified) {
var css, title, id;
var css;
// If there is no title set, use the filename, minus the extension
title = sheet.title || sheet.href.match(/(?:^|\/)([-\w]+)\.[a-z]+$/i)[1];
id = 'less:' + title;
var id = 'less:' + (sheet.title || sheet.href.match(/(?:^|\/)([-\w]+)\.[a-z]+$/i)[1]);
// If the stylesheet doesn't exist, create a new node
if ((css = document.getElementById(id)) === null) {
css = document.createElement('style');
css.type = 'text/css';
css.media = 'screen';
css.title = title;
css.id = id;
document.getElementsByTagName('head')[0].appendChild(css);
}