cloudhead/less.js — Issue #612: HTML5 and media bug
Author: deains
Created: 2012-02-01 11:50:52+00:00
State: open

There seems to be a bit of a discrepancy as to how less.js handles inserting `style` elements. When I add a LESS stylesheet like so:

The resulting `style` tag is:

The `media="screen"` part is added by LESS automatically, and should not be there. Under HTML5's specification, if the media attribute is omitted, it is assumed to be "all". LESS should either honour this and set `media="all"` on the `style` element, or simply omit it when it's not present on the `link` tag. The latter would be best, I think.