mirror of
https://github.com/less/less.js.git
synced 2026-01-22 21:58:14 -05:00
correct radial gradient format to w3c spec
This commit is contained in:
@@ -528,13 +528,14 @@ tree.functions = {
|
||||
case "to top right":
|
||||
gradientDirectionSvg = 'x1="0%" y1="100%" x2="100%" y2="0%"';
|
||||
break;
|
||||
case "radial":
|
||||
case "ellipse":
|
||||
case "ellipse at center":
|
||||
gradientType = "radial";
|
||||
gradientDirectionSvg = 'cx="50%" cy="50%" r="75%"';
|
||||
rectangleDimension = 'x="-50" y="-50" width="101" height="101"';
|
||||
break
|
||||
default:
|
||||
throw { type: "Argument", message: "svg-gradient direction must be 'to bottom', 'to right', 'to bottom right', 'to top right' or 'radial'" };
|
||||
throw { type: "Argument", message: "svg-gradient direction must be 'to bottom', 'to right', 'to bottom right', 'to top right' or 'ellipse at center'" };
|
||||
}
|
||||
returner = '<?xml version="1.0" ?>' +
|
||||
'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100%" height="100%" viewBox="0 0 1 1" preserveAspectRatio="none">' +
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
ArgumentError: error evaluating function `svg-gradient`: svg-gradient direction must be 'to bottom', 'to right', 'to bottom right', 'to top right' or 'radial' in {path}svg-gradient1.less on line 2, column 6:
|
||||
ArgumentError: error evaluating function `svg-gradient`: svg-gradient direction must be 'to bottom', 'to right', 'to bottom right', 'to top right' or 'ellipse at center' in {path}svg-gradient1.less on line 2, column 6:
|
||||
1 .a {
|
||||
2 a: svg-gradient(horizontal, black, white);
|
||||
3 }
|
||||
|
||||
Reference in New Issue
Block a user