zotero/scss/abstracts/_mixins.scss
2024-01-24 03:39:09 -05:00

27 lines
No EOL
896 B
SCSS

//
// Mixins
// --------------------------------------------------
@mixin svgicon($icon, $color, $size: "16", $prefix: false, $has2x: false) {
@if $has2x {
@if $prefix {
background-image: image-set(url('chrome://zotero/skin/#{$prefix}/#{$size}/#{$color}/#{$icon}.svg') 1x,
url('chrome://zotero/skin/#{$prefix}/#{$size}/#{$color}/#{$icon}@2x.svg') 2x);
}
@else {
background-image: image-set(url('chrome://zotero/skin/#{$size}/#{$color}/#{$icon}.svg') 1x,
url('chrome://zotero/skin/#{$size}/#{$color}/#{$icon}@2x.svg') 2x);
}
}
@else {
@if $prefix {
background-image: url('chrome://zotero/skin/#{$prefix}/#{$size}/#{$color}/#{$icon}.svg');
}
@else {
background-image: url('chrome://zotero/skin/#{$size}/#{$color}/#{$icon}.svg');
}
}
}