less 3.7.0 → 3.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/Gruntfile.js +45 -7
  3. package/bin/lessc +24 -5
  4. package/dist/less.js +644 -210
  5. package/dist/less.min.js +7 -7
  6. package/lib/less/constants.js +13 -0
  7. package/lib/less/contexts.js +38 -10
  8. package/lib/less/default-options.js +1 -1
  9. package/lib/less/functions/color.js +84 -41
  10. package/lib/less/functions/data-uri.js +1 -1
  11. package/lib/less/functions/list.js +44 -9
  12. package/lib/less/import-manager.js +3 -3
  13. package/lib/less/index.js +1 -1
  14. package/lib/less/parse.js +1 -1
  15. package/lib/less/parser/parser.js +2 -9
  16. package/lib/less/source-map-output.js +2 -2
  17. package/lib/less/tree/color.js +58 -18
  18. package/lib/less/tree/declaration.js +1 -1
  19. package/lib/less/tree/expression.js +1 -1
  20. package/lib/less/tree/import.js +9 -8
  21. package/lib/less/tree/operation.js +1 -1
  22. package/lib/less/tree/url.js +12 -8
  23. package/lib/less/tree/variable-call.js +6 -3
  24. package/lib/less/utils.js +36 -26
  25. package/lib/less-browser/add-default-options.js +4 -0
  26. package/lib/less-browser/index.js +9 -2
  27. package/lib/less-node/image-size.js +1 -1
  28. package/lib/less-node/lessc-helper.js +2 -1
  29. package/package.json +5 -3
  30. package/test/browser/css/rewrite-urls/urls.css +36 -0
  31. package/test/browser/css/rootpath-rewrite-urls/urls.css +35 -0
  32. package/test/browser/less/rewrite-urls/urls.less +34 -0
  33. package/test/browser/less/rootpath-rewrite-urls/urls.less +33 -0
  34. package/test/browser/less.js +644 -210
  35. package/test/browser/runner-rewrite-urls-options.js +3 -0
  36. package/test/browser/runner-rewrite-urls-spec.js +3 -0
  37. package/test/browser/runner-rootpath-relative-spec.js +1 -1
  38. package/test/browser/runner-rootpath-rewrite-urls-options.js +4 -0
  39. package/test/browser/runner-rootpath-rewrite-urls-spec.js +3 -0
  40. package/test/css/colors.css +20 -3
  41. package/test/css/css-escapes.css +3 -0
  42. package/test/css/functions-each.css +34 -0
  43. package/test/css/functions.css +4 -4
  44. package/test/css/rewrite-urls-all/rewrite-urls-all.css +17 -0
  45. package/test/css/rewrite-urls-local/rewrite-urls-local.css +17 -0
  46. package/test/css/rootpath-rewrite-urls-all/rootpath-rewrite-urls-all.css +17 -0
  47. package/test/css/rootpath-rewrite-urls-local/rootpath-rewrite-urls-local.css +17 -0
  48. package/test/css/static-urls/urls.css +2 -2
  49. package/test/css/urls.css +2 -2
  50. package/test/index.js +8 -2
  51. package/test/less/colors.less +18 -0
  52. package/test/less/css-escapes.less +4 -0
  53. package/test/less/errors/color-func-invalid-color.txt +1 -1
  54. package/test/less/functions-each.less +51 -1
  55. package/test/less/rewrite-urls-all/folder/file.less +8 -0
  56. package/test/less/rewrite-urls-all/rewrite-urls-all.less +11 -0
  57. package/test/less/rewrite-urls-local/folder/file.less +8 -0
  58. package/test/less/rewrite-urls-local/rewrite-urls-local.less +11 -0
  59. package/test/less/rootpath-rewrite-urls-all/folder/file.less +8 -0
  60. package/test/less/rootpath-rewrite-urls-all/rootpath-rewrite-urls-all.less +11 -0
  61. package/test/less/rootpath-rewrite-urls-local/folder/file.less +8 -0
  62. package/test/less/rootpath-rewrite-urls-local/rootpath-rewrite-urls-local.less +11 -0
  63. package/test/less/sourcemaps/custom-props.less +8 -0
  64. package/test/less-bom/colors.less +18 -0
  65. package/test/less-bom/css-escapes.less +4 -0
  66. package/test/less-bom/errors/color-func-invalid-color.txt +1 -1
  67. package/test/less-bom/functions-each.less +51 -1
  68. package/test/less-bom/rewrite-urls-all/folder/file.less +8 -0
  69. package/test/less-bom/rewrite-urls-all/rewrite-urls-all.less +11 -0
  70. package/test/less-bom/rewrite-urls-local/folder/file.less +8 -0
  71. package/test/less-bom/rewrite-urls-local/rewrite-urls-local.less +11 -0
  72. package/test/less-bom/rootpath-rewrite-urls-all/folder/file.less +8 -0
  73. package/test/less-bom/rootpath-rewrite-urls-all/rootpath-rewrite-urls-all.less +11 -0
  74. package/test/less-bom/rootpath-rewrite-urls-local/folder/file.less +8 -0
  75. package/test/less-bom/rootpath-rewrite-urls-local/rootpath-rewrite-urls-local.less +11 -0
  76. package/test/less-bom/sourcemaps/custom-props.less +8 -0
  77. package/test/less-test.js +26 -12
  78. package/test/sourcemaps/custom-props.json +1 -0
  79. package/.npmignore +0 -8
  80. package/lib/less/math-constants.js +0 -6
  81. package/test/css/3rd-party/bootstrap.css +0 -6814
  82. package/test/less/3rd-party/bootstrap.less +0 -1
  83. package/test/less/errors/color-invalid-hex-code.less +0 -4
  84. package/test/less/errors/color-invalid-hex-code.txt +0 -4
  85. package/test/less/errors/color-invalid-hex-code2.less +0 -4
  86. package/test/less/errors/color-invalid-hex-code2.txt +0 -4
  87. package/test/less-bom/3rd-party/bootstrap.less +0 -1
  88. package/test/less-bom/errors/color-invalid-hex-code.less +0 -4
  89. package/test/less-bom/errors/color-invalid-hex-code.txt +0 -4
  90. package/test/less-bom/errors/color-invalid-hex-code2.less +0 -4
  91. package/test/less-bom/errors/color-invalid-hex-code2.txt +0 -4
@@ -97,17 +97,18 @@ Import.prototype.evalForImport = function (context) {
97
97
  };
98
98
  Import.prototype.evalPath = function (context) {
99
99
  var path = this.path.eval(context);
100
- var rootpath = this._fileInfo && this._fileInfo.rootpath;
100
+ var fileInfo = this._fileInfo;
101
101
 
102
102
  if (!(path instanceof URL)) {
103
- if (rootpath) {
104
- var pathValue = path.value;
105
- // Add the base path if the import is relative
106
- if (pathValue && context.isPathRelative(pathValue)) {
107
- path.value = rootpath + pathValue;
108
- }
103
+ // Add the rootpath if the URL requires a rewrite
104
+ var pathValue = path.value;
105
+ if (fileInfo &&
106
+ pathValue &&
107
+ context.pathRequiresRewrite(pathValue)) {
108
+ path.value = context.rewritePath(pathValue, fileInfo.rootpath);
109
+ } else {
110
+ path.value = context.normalizePath(path.value);
109
111
  }
110
- path.value = context.normalizePath(path.value);
111
112
  }
112
113
 
113
114
  return path;
@@ -1,7 +1,7 @@
1
1
  var Node = require('./node'),
2
2
  Color = require('./color'),
3
3
  Dimension = require('./dimension'),
4
- MATH = require('../math-constants');
4
+ MATH = require('../constants').Math;
5
5
 
6
6
  var Operation = function (op, operands, isSpaced) {
7
7
  this.op = op.trim();
@@ -21,20 +21,19 @@ URL.prototype.eval = function (context) {
21
21
  rootpath;
22
22
 
23
23
  if (!this.isEvald) {
24
- // Add the base path if the URL is relative
24
+ // Add the rootpath if the URL requires a rewrite
25
25
  rootpath = this.fileInfo() && this.fileInfo().rootpath;
26
- if (rootpath &&
26
+ if (typeof rootpath === 'string' &&
27
27
  typeof val.value === 'string' &&
28
- context.isPathRelative(val.value)) {
29
-
28
+ context.pathRequiresRewrite(val.value)) {
30
29
  if (!val.quote) {
31
- rootpath = rootpath.replace(/[\(\)'"\s]/g, function(match) { return '\\' + match; });
30
+ rootpath = escapePath(rootpath);
32
31
  }
33
- val.value = rootpath + val.value;
32
+ val.value = context.rewritePath(val.value, rootpath);
33
+ } else {
34
+ val.value = context.normalizePath(val.value);
34
35
  }
35
36
 
36
- val.value = context.normalizePath(val.value);
37
-
38
37
  // Add url args if enabled
39
38
  if (context.urlArgs) {
40
39
  if (!val.value.match(/^\s*data:/)) {
@@ -51,4 +50,9 @@ URL.prototype.eval = function (context) {
51
50
 
52
51
  return new URL(val, this.getIndex(), this.fileInfo(), true);
53
52
  };
53
+
54
+ function escapePath(path) {
55
+ return path.replace(/[\(\)'"\s]/g, function(match) { return '\\' + match; });
56
+ }
57
+
54
58
  module.exports = URL;
@@ -17,16 +17,19 @@ VariableCall.prototype.eval = function (context) {
17
17
  error = new LessError({message: 'Could not evaluate variable call ' + this.variable});
18
18
 
19
19
  if (!detachedRuleset.ruleset) {
20
- if (Array.isArray(detachedRuleset)) {
20
+ if (detachedRuleset.rules) {
21
21
  rules = detachedRuleset;
22
22
  }
23
+ else if (Array.isArray(detachedRuleset)) {
24
+ rules = new Ruleset('', detachedRuleset);
25
+ }
23
26
  else if (Array.isArray(detachedRuleset.value)) {
24
- rules = detachedRuleset.value;
27
+ rules = new Ruleset('', detachedRuleset.value);
25
28
  }
26
29
  else {
27
30
  throw error;
28
31
  }
29
- detachedRuleset = new DetachedRuleset(new Ruleset('', rules));
32
+ detachedRuleset = new DetachedRuleset(rules);
30
33
  }
31
34
  if (detachedRuleset.ruleset) {
32
35
  return detachedRuleset.callEval(context);
package/lib/less/utils.js CHANGED
@@ -1,5 +1,6 @@
1
1
  /* jshint proto: true */
2
- var MATH = require('./math-constants');
2
+ var Constants = require('./constants');
3
+ var clone = require('clone');
3
4
 
4
5
  var utils = {
5
6
  getLocation: function(index, inputStream) {
@@ -39,49 +40,58 @@ var utils = {
39
40
  return cloned;
40
41
  },
41
42
  copyOptions: function(obj1, obj2) {
43
+ if (obj2 && obj2._defaults) {
44
+ return obj2;
45
+ }
42
46
  var opts = utils.defaults(obj1, obj2);
43
47
  if (opts.strictMath) {
44
- opts.math = MATH.STRICT_LEGACY;
48
+ opts.math = Constants.Math.STRICT_LEGACY;
49
+ }
50
+ // Back compat with changed relativeUrls option
51
+ if (opts.relativeUrls) {
52
+ opts.rewriteUrls = Constants.RewriteUrls.ALL;
45
53
  }
46
- if (opts.hasOwnProperty('math') && typeof opts.math === 'string') {
54
+ if (typeof opts.math === 'string') {
47
55
  switch (opts.math.toLowerCase()) {
48
56
  case 'always':
49
- opts.math = MATH.ALWAYS;
57
+ opts.math = Constants.Math.ALWAYS;
50
58
  break;
51
59
  case 'parens-division':
52
- opts.math = MATH.PARENS_DIVISION;
60
+ opts.math = Constants.Math.PARENS_DIVISION;
53
61
  break;
54
62
  case 'strict':
55
63
  case 'parens':
56
- opts.math = MATH.PARENS;
64
+ opts.math = Constants.Math.PARENS;
57
65
  break;
58
66
  case 'strict-legacy':
59
- opts.math = MATH.STRICT_LEGACY;
67
+ opts.math = Constants.Math.STRICT_LEGACY;
68
+ }
69
+ }
70
+ if (typeof opts.rewriteUrls === 'string') {
71
+ switch (opts.rewriteUrls.toLowerCase()) {
72
+ case 'off':
73
+ opts.rewriteUrls = Constants.RewriteUrls.OFF;
74
+ break;
75
+ case 'local':
76
+ opts.rewriteUrls = Constants.RewriteUrls.LOCAL;
77
+ break;
78
+ case 'all':
79
+ opts.rewriteUrls = Constants.RewriteUrls.ALL;
80
+ break;
60
81
  }
61
82
  }
62
83
  return opts;
63
84
  },
64
85
  defaults: function(obj1, obj2) {
65
- if (!obj2._defaults || obj2._defaults !== obj1) {
66
- for (var prop in obj1) {
67
- if (obj1.hasOwnProperty(prop)) {
68
- if (!obj2.hasOwnProperty(prop)) {
69
- obj2[prop] = obj1[prop];
70
- }
71
- else if (Array.isArray(obj1[prop])
72
- && Array.isArray(obj2[prop])) {
73
-
74
- obj1[prop].forEach(function(p) {
75
- if (obj2[prop].indexOf(p) === -1) {
76
- obj2[prop].push(p);
77
- }
78
- });
79
- }
80
- }
81
- }
86
+ var newObj = obj2 || {};
87
+ if (!obj2._defaults) {
88
+ newObj = {};
89
+ var defaults = clone(obj1);
90
+ newObj._defaults = defaults;
91
+ var cloned = obj2 ? clone(obj2) : {};
92
+ Object.assign(newObj, defaults, cloned);
82
93
  }
83
- obj2._defaults = obj1;
84
- return obj2;
94
+ return newObj;
85
95
  },
86
96
  merge: function(obj1, obj2) {
87
97
  for (var prop in obj2) {
@@ -42,4 +42,8 @@ module.exports = function(window, options) {
42
42
  if (options.onReady === undefined) {
43
43
  options.onReady = true;
44
44
  }
45
+
46
+ if (options.relativeUrls) {
47
+ options.rewriteUrls = 'all';
48
+ }
45
49
  };
@@ -30,7 +30,13 @@ module.exports = function(window, options) {
30
30
  var typePattern = /^text\/(x-)?less$/;
31
31
 
32
32
  function clone(obj) {
33
- return JSON.parse(JSON.stringify(obj || {}));
33
+ var cloned = {};
34
+ for (var prop in obj) {
35
+ if (obj.hasOwnProperty(prop)) {
36
+ cloned[prop] = obj[prop];
37
+ }
38
+ }
39
+ return cloned;
34
40
  }
35
41
 
36
42
  // only really needed for phantom
@@ -93,7 +99,8 @@ module.exports = function(window, options) {
93
99
  currentDirectory: fileManager.getPath(path),
94
100
  filename: path,
95
101
  rootFilename: path,
96
- relativeUrls: instanceOptions.relativeUrls};
102
+ rewriteUrls: instanceOptions.rewriteUrls
103
+ };
97
104
 
98
105
  newFileInfo.entryPath = newFileInfo.currentDirectory;
99
106
  newFileInfo.rootpath = instanceOptions.rootpath || newFileInfo.currentDirectory;
@@ -6,7 +6,7 @@ module.exports = function(environment) {
6
6
  function imageSize(functionContext, filePathNode) {
7
7
  var filePath = filePathNode.value;
8
8
  var currentFileInfo = functionContext.currentFileInfo;
9
- var currentDirectory = currentFileInfo.relativeUrls ?
9
+ var currentDirectory = currentFileInfo.rewriteUrls ?
10
10
  currentFileInfo.currentDirectory : currentFileInfo.entryPath;
11
11
 
12
12
  var fragmentStart = filePath.indexOf('#');
@@ -47,7 +47,8 @@ var lessc_helper = {
47
47
  console.log(' in generated CSS file.');
48
48
  console.log(' -rp, --rootpath=URL Sets rootpath for url rewriting in relative imports and urls');
49
49
  console.log(' Works with or without the relative-urls option.');
50
- console.log(' -ru, --relative-urls Re-writes relative urls to the base less file.');
50
+ console.log(' -ru=, --rewrite-urls= Rewrites URLs to make them relative to the base less file.');
51
+ console.log(' all|local|off \'all\' rewrites all URLs, \'local\' just those starting with a \'.\'');
51
52
  console.log('');
52
53
  console.log(' -m=, --math=');
53
54
  console.log(' always Less will eagerly perform math operations always.');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "less",
3
- "version": "3.7.0",
3
+ "version": "3.9.0",
4
4
  "description": "Leaner CSS",
5
5
  "homepage": "http://lesscss.org",
6
6
  "author": {
@@ -51,7 +51,6 @@
51
51
  "source-map": "~0.6.0"
52
52
  },
53
53
  "devDependencies": {
54
- "bootstrap": "3.3.7",
55
54
  "bootstrap-less-port": "0.3.0",
56
55
  "diff": "^3.2.0",
57
56
  "git-rev": "^0.2.1",
@@ -71,6 +70,7 @@
71
70
  "less-plugin-autoprefix": "^1.5.1",
72
71
  "less-plugin-clean-css": "^1.5.1",
73
72
  "performance-now": "^0.2.0",
73
+ "phantomjs-polyfill-object-assign": "0.0.2",
74
74
  "phantomjs-prebuilt": "^2.1.16",
75
75
  "phin": "^2.2.3",
76
76
  "promise": "^7.1.1",
@@ -104,5 +104,7 @@
104
104
  ],
105
105
  "rawcurrent": "https://raw.github.com/less/less.js/v",
106
106
  "sourcearchive": "https://github.com/less/less.js/archive/v",
107
- "dependencies": {}
107
+ "dependencies": {
108
+ "clone": "^2.1.2"
109
+ }
108
110
  }
@@ -0,0 +1,36 @@
1
+ @import "http://localhost:8081/test/browser/less/imports/modify-this.css";
2
+ @import "http://localhost:8081/test/browser/less/imports/modify-again.css";
3
+ .modify {
4
+ my-url: url("http://localhost:8081/test/browser/less/imports/a.png");
5
+ }
6
+ .modify {
7
+ my-url: url("http://localhost:8081/test/browser/less/imports/b.png");
8
+ }
9
+ @font-face {
10
+ src: url("/fonts/garamond-pro.ttf");
11
+ src: local(Futura-Medium), url(http://localhost:8081/test/browser/less/rewrite-urls/fonts.svg#MyGeometricModern) format("svg");
12
+ }
13
+ #shorthands {
14
+ background: url("http://www.lesscss.org/spec.html") no-repeat 0 4px;
15
+ }
16
+ #misc {
17
+ background-image: url(http://localhost:8081/test/browser/less/rewrite-urls/images/image.jpg);
18
+ background: url("#inline-svg");
19
+ }
20
+ #data-uri {
21
+ background: url(data:image/png;charset=utf-8;base64,
22
+ kiVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD/
23
+ k//+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4U
24
+ kg9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC);
25
+ background-image: url(data:image/x-png,f9difSSFIIGFIFJD1f982FSDKAA9==);
26
+ background-image: url(http://fonts.googleapis.com/css?family=\"Rokkitt\":\(400\),700);
27
+ }
28
+ #svg-data-uri {
29
+ background: transparent url('data:image/svg+xml, <svg version="1.1"><g></g></svg>');
30
+ }
31
+ .comma-delimited {
32
+ background: url(http://localhost:8081/test/browser/less/rewrite-urls/bg.jpg) no-repeat, url(http://localhost:8081/test/browser/less/rewrite-urls/bg.png) repeat-x top left, url(http://localhost:8081/test/browser/less/rewrite-urls/bg);
33
+ }
34
+ .values {
35
+ url: url('http://localhost:8081/test/browser/less/rewrite-urls/Trebuchet');
36
+ }
@@ -0,0 +1,35 @@
1
+ @import "https://www.github.com/cloudhead/imports/modify-this.css";
2
+ @import "https://www.github.com/cloudhead/imports/modify-again.css";
3
+ .modify {
4
+ my-url: url("https://www.github.com/cloudhead/imports/a.png");
5
+ }
6
+ .modify {
7
+ my-url: url("https://www.github.com/cloudhead/imports/b.png");
8
+ }
9
+ @font-face {
10
+ src: url("/fonts/garamond-pro.ttf");
11
+ src: local(Futura-Medium), url(https://www.github.com/cloudhead/less.js/fonts.svg#MyGeometricModern) format("svg");
12
+ }
13
+ #shorthands {
14
+ background: url("http://www.lesscss.org/spec.html") no-repeat 0 4px;
15
+ }
16
+ #misc {
17
+ background-image: url(https://www.github.com/cloudhead/less.js/images/image.jpg);
18
+ }
19
+ #data-uri {
20
+ background: url(data:image/png;charset=utf-8;base64,
21
+ kiVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD/
22
+ k//+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4U
23
+ kg9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC);
24
+ background-image: url(data:image/x-png,f9difSSFIIGFIFJD1f982FSDKAA9==);
25
+ background-image: url(http://fonts.googleapis.com/css?family=\"Rokkitt\":\(400\),700);
26
+ }
27
+ #svg-data-uri {
28
+ background: transparent url('data:image/svg+xml, <svg version="1.1"><g></g></svg>');
29
+ }
30
+ .comma-delimited {
31
+ background: url(https://www.github.com/cloudhead/less.js/bg.jpg) no-repeat, url(https://www.github.com/cloudhead/less.js/bg.png) repeat-x top left, url(https://www.github.com/cloudhead/less.js/bg);
32
+ }
33
+ .values {
34
+ url: url('https://www.github.com/cloudhead/less.js/Trebuchet');
35
+ }
@@ -0,0 +1,34 @@
1
+ @import ".././imports/urls.less";
2
+ @import "http://localhost:8081/test/browser/less/imports/urls2.less";
3
+ @font-face {
4
+ src: url("/fonts/garamond-pro.ttf");
5
+ src: local(Futura-Medium),
6
+ url(fonts.svg#MyGeometricModern) format("svg");
7
+ }
8
+ #shorthands {
9
+ background: url("http://www.lesscss.org/spec.html") no-repeat 0 4px;
10
+ }
11
+ #misc {
12
+ background-image: url(images/image.jpg);
13
+ background: url("#inline-svg");
14
+ }
15
+ #data-uri {
16
+ background: url(data:image/png;charset=utf-8;base64,
17
+ kiVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD/
18
+ k//+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4U
19
+ kg9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC);
20
+ background-image: url(data:image/x-png,f9difSSFIIGFIFJD1f982FSDKAA9==);
21
+ background-image: url(http://fonts.googleapis.com/css?family=\"Rokkitt\":\(400\),700);
22
+ }
23
+
24
+ #svg-data-uri {
25
+ background: transparent url('data:image/svg+xml, <svg version="1.1"><g></g></svg>');
26
+ }
27
+
28
+ .comma-delimited {
29
+ background: url(bg.jpg) no-repeat, url(bg.png) repeat-x top left, url(bg);
30
+ }
31
+ .values {
32
+ @a: 'Trebuchet';
33
+ url: url(@a);
34
+ }
@@ -0,0 +1,33 @@
1
+ @import "../imports/urls.less";
2
+ @import "http://localhost:8081/test/browser/less/imports/urls2.less";
3
+ @font-face {
4
+ src: url("/fonts/garamond-pro.ttf");
5
+ src: local(Futura-Medium),
6
+ url(fonts.svg#MyGeometricModern) format("svg");
7
+ }
8
+ #shorthands {
9
+ background: url("http://www.lesscss.org/spec.html") no-repeat 0 4px;
10
+ }
11
+ #misc {
12
+ background-image: url(images/image.jpg);
13
+ }
14
+ #data-uri {
15
+ background: url(data:image/png;charset=utf-8;base64,
16
+ kiVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD/
17
+ k//+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4U
18
+ kg9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC);
19
+ background-image: url(data:image/x-png,f9difSSFIIGFIFJD1f982FSDKAA9==);
20
+ background-image: url(http://fonts.googleapis.com/css?family=\"Rokkitt\":\(400\),700);
21
+ }
22
+
23
+ #svg-data-uri {
24
+ background: transparent url('data:image/svg+xml, <svg version="1.1"><g></g></svg>');
25
+ }
26
+
27
+ .comma-delimited {
28
+ background: url(bg.jpg) no-repeat, url(bg.png) repeat-x top left, url(bg);
29
+ }
30
+ .values {
31
+ @a: 'Trebuchet';
32
+ url: url(@a);
33
+ }