Implement linear-gradient rendering

This commit is contained in:
Niklas von Hertzen
2017-08-05 21:13:53 +08:00
parent 56b3b6df27
commit 9bdb871307
5 changed files with 267 additions and 5 deletions

View File

@@ -335,7 +335,7 @@ const parseBackgroundImage = (image: string, imageLoader: ImageLoader): Array<Ba
}
if (definition) {
args.push(definition);
args.push(definition.trim());
}
const prefix_i = method.indexOf('-', 1) + 1;
@@ -402,7 +402,7 @@ const parseBackgroundImage = (image: string, imageLoader: ImageLoader): Array<Ba
return;
} else if (mode === 1) {
if (numParen === 0 && !method.match(/^url$/i)) {
args.push(definition);
args.push(definition.trim());
definition = '';
return;
}