Skip to content

Commit d104472

Browse files
authored
Merge pull request #386 from BeAPI/feature/svg-url
fix svg url mixin for use css mask
2 parents 856d140 + b8c58d0 commit d104472

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/scss/02-tools/_f-get-svg-url.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,9 @@
2525
$style: " style='" + $style + "'";
2626
}
2727

28-
@return url("data:image/svg+xml;charset=utf8, %3Csvg xmlns='http://www.w3.org/2000/svg' fill='rgba(#{red($fill), green($fill), blue($fill), $opacity})'" + $style + " viewBox='" + nth(map.get($svgs, $name), 1) + "'%3E%" + nth(map.get($svgs, $name), 2) + "%3C/svg%3E");
28+
@if ($fill != "") {
29+
$fill: " fill='rgba(#{red($fill), green($fill), blue($fill), $opacity})'";
30+
}
31+
32+
@return url("data:image/svg+xml;charset=utf8, %3Csvg xmlns='http://www.w3.org/2000/svg'" + $fill + $style + " viewBox='" + nth(map.get($svgs, $name), 1) + "'%3E%" + nth(map.get($svgs, $name), 2) + "%3C/svg%3E"); /* stylelint-disable-line */
2933
}

0 commit comments

Comments
 (0)