cloudhead/less.js — Issue #695: Less Breaks on Protocol Agnostic URLs
Author: ttfkam
Created: 2012-03-08 22:40:25+00:00
State: open

Less accepts URLs like url('http://www.example.com/images/foo.png') correctly as well as translating paths for relative links like url('../images/foo.png') or url('/images/foo.png').

However, it fails for completely valid URLs like url('//www.example.com/images/foo.png') where the request uses whatever protocol the calling page is using, .e.g., https or http.

You end up with URLs in the output CSS like url('http://www.example.com/images//www.example.com/images/foo.png'), which is obviously non-optimal.