diff --git a/lib/less/browser.js b/lib/less/browser.js index a2a2970..16d87ca 100644 --- a/lib/less/browser.js +++ b/lib/less/browser.js @@ -72,6 +72,17 @@ for (var i = 0; i < links.length; i++) { } } +var styles = document.getElementsByTagName('style'); + +for (var i = 0; i < styles.length; i++) { + if (styles[i].type.match(typePattern)) { + new(less.Parser)().parse(styles[i].innerHTML || '', function (e, tree) { + styles[i].type = 'text/css'; + styles[i].innerHTML = tree.toCSS(); + }); + } +} + var startTime = endTime = new(Date); less.refresh = function (reload) {