Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-07-09 12:34:48 +0300
committerJulius Härtl <jus@bitgrid.net>2018-07-19 09:16:59 +0300
commitdccfed8d1c1714eb31f443482bd7ef98c54d638c (patch)
tree0f37bc00a92a0484bb595430da3d2b04a19d6ac0 /core/css/functions.scss
parent14bc9ffda4cdf42b047725b581d6a1129eb70a5b (diff)
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.scss7
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