diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-07-09 11:34:48 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2018-07-19 08:16:59 +0200 |
commit | dccfed8d1c1714eb31f443482bd7ef98c54d638c (patch) | |
tree | 0f37bc00a92a0484bb595430da3d2b04a19d6ac0 /core/css/functions.scss | |
parent | 14bc9ffda4cdf42b047725b581d6a1129eb70a5b (diff) | |
download | nextcloud-server-dccfed8d1c1714eb31f443482bd7ef98c54d638c.tar.gz nextcloud-server-dccfed8d1c1714eb31f443482bd7ef98c54d638c.zip |
Add versionning to icon svg color api function
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'core/css/functions.scss')
-rw-r--r-- | core/css/functions.scss | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/css/functions.scss b/core/css/functions.scss index 6cfad2c7ebb..2875230b512 100644 --- a/core/css/functions.scss +++ b/core/css/functions.scss @@ -26,11 +26,12 @@ * @param string $icon the icon filename * @param string $dir the icon folder within /core/img if $core or app name * @param string $color the desired color in hexadecimal + * @param int $version the version of the file * @param bool [$core] search icon in core * * @returns string the url to the svg api endpoint */ -@mixin icon-color($icon, $dir, $color, $core: false) { +@mixin icon-color($icon, $dir, $color, $version: 1, $core: false) { // remove # from color // inspect cast int to string $index: str-index(inspect($color), '#'); @@ -39,9 +40,9 @@ } $varName: "--icon-#{$icon}-#{$color}"; @if $core { - #{$varName}: url('#{$webroot}/svg/core/#{$dir}/#{$icon}/#{$color}?v=1'); + #{$varName}: url('#{$webroot}/svg/core/#{$dir}/#{$icon}/#{$color}?v=#{$version}'); } @else { - #{$varName}: url('#{$webroot}/svg/#{$dir}/#{$icon}/#{$color}?v=1'); + #{$varName}: url('#{$webroot}/svg/#{$dir}/#{$icon}/#{$color}?v=#{$version}'); } background-image: var(#{$varName}); }
\ No newline at end of file |