summaryrefslogtreecommitdiffstats
path: root/core/css/functions.scss
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2018-07-20 12:49:16 +0200
committerJulius Härtl <jus@bitgrid.net>2018-07-20 12:49:16 +0200
commit46be8e69c704cced5960ee2b87ef58c936435005 (patch)
treecad66e7a2117516e555224ae05ec04483039392a /core/css/functions.scss
parent6b440cc36558246b9651344872013aa9de21f86e (diff)
downloadnextcloud-server-46be8e69c704cced5960ee2b87ef58c936435005.tar.gz
nextcloud-server-46be8e69c704cced5960ee2b87ef58c936435005.zip
Add icon-black-white mixin to automatically generate icon classes
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'core/css/functions.scss')
-rw-r--r--core/css/functions.scss14
1 files changed, 14 insertions, 0 deletions
diff --git a/core/css/functions.scss b/core/css/functions.scss
index 2875230b512..30075df7f58 100644
--- a/core/css/functions.scss
+++ b/core/css/functions.scss
@@ -45,4 +45,18 @@
#{$varName}: url('#{$webroot}/svg/#{$dir}/#{$icon}/#{$color}?v=#{$version}');
}
background-image: var(#{$varName});
+}
+
+/**
+ * Create black and white icons
+ * This will add a default black version of and an additional white version when .icon-white is applied
+ */
+@mixin icon-black-white($icon, $dir, $version, $core: false) {
+ .icon-#{$icon} {
+ @include icon-color($icon, $dir, $color-black, $version, $core);
+ }
+ .icon-#{$icon}-white,
+ .icon-#{$icon}.icon-white {
+ @include icon-color($icon, $dir, $color-white, $version, $core);
+ }
} \ No newline at end of file