Fix item type icons broken on 2x screens

Icons preloading introduced in 247755c5 overrides entire background
property, not just background-image. On 2x screens (and anywhere else
where svg icons need to be scaled) icons need property `background-size:
contain` to be displayed correctly. This previously came from
`.icon-css` class but have been overriden by code generated in
`svgicon`, so to fix this, these properties need to be added to the
`svgicon`.
This commit is contained in:
Tom Najdek 2023-10-23 15:17:12 +02:00 committed by Dan Stillman
parent 8b9d8b1be5
commit 78d82d22cc
2 changed files with 1 additions and 4 deletions

View file

@ -1,6 +1,6 @@
@mixin svgicon($icon, $color, $size: "16", $prefix: false, $has2x: false) {
background:
-make-icon-background($icon, $color, $size, $prefix, $has2x),
-make-icon-background($icon, $color, $size, $prefix, $has2x) no-repeat center/contain,
// Invisible backgrounds to preload all variants:
-make-icon-background($icon, 'white', $size, $prefix, $has2x) center/0,

View file

@ -14,9 +14,6 @@
.icon-css {
display: inline-block;
background-repeat: no-repeat;
background-size: contain;
background-position: center;
vertical-align: middle;
}