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:
parent
8b9d8b1be5
commit
78d82d22cc
2 changed files with 1 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
||||||
@mixin svgicon($icon, $color, $size: "16", $prefix: false, $has2x: false) {
|
@mixin svgicon($icon, $color, $size: "16", $prefix: false, $has2x: false) {
|
||||||
background:
|
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:
|
// Invisible backgrounds to preload all variants:
|
||||||
-make-icon-background($icon, 'white', $size, $prefix, $has2x) center/0,
|
-make-icon-background($icon, 'white', $size, $prefix, $has2x) center/0,
|
||||||
|
|
|
@ -14,9 +14,6 @@
|
||||||
|
|
||||||
.icon-css {
|
.icon-css {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-size: contain;
|
|
||||||
background-position: center;
|
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue