From 78d82d22cc00008ecb3c3c08d7826daff4db1fd3 Mon Sep 17 00:00:00 2001 From: Tom Najdek Date: Mon, 23 Oct 2023 15:17:12 +0200 Subject: [PATCH] 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`. --- scss/abstracts/_svgicon.scss | 2 +- scss/components/_icons.scss | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/scss/abstracts/_svgicon.scss b/scss/abstracts/_svgicon.scss index 0c421b67e1..12d4d98d43 100644 --- a/scss/abstracts/_svgicon.scss +++ b/scss/abstracts/_svgicon.scss @@ -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, diff --git a/scss/components/_icons.scss b/scss/components/_icons.scss index 19e316ae3e..fb9b5a98df 100644 --- a/scss/components/_icons.scss +++ b/scss/components/_icons.scss @@ -14,9 +14,6 @@ .icon-css { display: inline-block; - background-repeat: no-repeat; - background-size: contain; - background-position: center; vertical-align: middle; }