cloudhead/less.js — pull request #818 by Fordi (2012-05-31 19:16:24+00:00)
Title: Support for better debugging

When using with data uris, rather than , developer tools have the ability to directly access the compiled stylesheet.

Notes:
* A test for window.btoa is not a direct test of the ability to use data uris
* btoa _is_ a prerequisite for creating data uris without a lot of extra code to implement base64 encoding
* Practically speaking, btoa is only present on browsers that support data uris - though some browsers that do not have btoa do support data uris
* Directly testing for data uri support _must_ be asynchronous, which limits its suitability to less.js

For these reasons, it is my opinion that testing for the existence of btoa is a suitable guard for the data uri feature. Potentially, an additional guard of "less.env === 'development'" could be inserted to ensure that end-users do not experience unexpected oddness as a result of this change.