UNPKG

grunt-less2js

Version:

Convert some variables.less to JSON to be used in Javascript

37 lines (29 loc) 786 B
// Sample of less-css variables @import "other"; // colors @baseColor: black; @hexColor: #445566; @rgbaColor: rgba(255, 0, 0, .5); @lightColor: lighten(@baseColor, 25%); // dimensions @fontSize: 1em; @someNumericValue: 25; @justANumber: 1000; @blurRadius: 5px; @doubleRadius: @blurRadius * 2; @maxWidth: 50%; // expressions @boxShadow: 0 0 @blurRadius black; @someText: 'Some value is @{someNumericValue}'; @fontBase: @fontSize ~"Helvetica Neue, Arial, sans-serif"; // ignored prefix @_inverse: '#ccc'; // invalid js names @my-name: 'john smith'; @-other-bad-js-name: hello world; // some test-cases for specific options @_ignoreWithPrefix: must be ignored; @camel-case: must be exported as camelCase; @parsedNumber: 100; @unwrappedString: "string"; @unwrappedString2: 'string';