Skip to content

Instantly share code, notes, and snippets.

@zkenda
zkenda / JsLitmus.js
Last active December 12, 2015 02:58
My approach to less.modifyVars. To avoid reparsing I just modify "expression tree" and then render again. Only intresting file is less-1.3.1.modifyVars.js and perhaps modified less-1.3.1.js (which is actually 1.3.3). Index.html, test.less and jsLitmus.js are for demonstration.
// JSLitmus.js
//
// Copyright (c) 2010, Robert Kieffer, http://broofa.com
// Available under MIT license (http://en.wikipedia.org/wiki/MIT_License)
(function() {
// Private methods and state
// Get platform info but don't go crazy trying to recognize everything
// that's out there. This is just for the major platforms and OSes.