From ba31d2f163a86e449d0eba64962f5e49f4ba8381 Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Mon, 19 Apr 2021 23:57:54 +0300 Subject: [PATCH] [common] fix bug 49731 --- .../resources/less/combo-border-size.less | 21 ++++++------------- .../main/resources/less/rightmenu.less | 21 ++++++------------- 2 files changed, 12 insertions(+), 30 deletions(-) diff --git a/apps/common/main/resources/less/combo-border-size.less b/apps/common/main/resources/less/combo-border-size.less index 380c542e3..1668f92e3 100644 --- a/apps/common/main/resources/less/combo-border-size.less +++ b/apps/common/main/resources/less/combo-border-size.less @@ -33,23 +33,14 @@ img, .image { background: ~"url(@{common-image-const-path}/combo-border-size/BorderSize.png) no-repeat 0 0"; + background-size: 60px auto; - @media only screen { - //@media (-webkit-min-device-pixel-ratio: 1.5) and (-webkit-max-device-pixel-ratio: 1.9), - // (min-resolution: 1.5dppx) and (max-resolution: 1.9dppx), - // (min-resolution: 144dpi) and (max-resolution: 191dpi) - //{ - // background-image: ~"url(@{common-image-const-path}/combo-border-size/BorderSize@1.5x.png)"; - // background-size: 60px auto; - //} + .pixel-ratio__1_5 & { + background-image: ~"url(@{common-image-const-path}/combo-border-size/BorderSize@1.5x.png)"; + } - @media (-webkit-min-device-pixel-ratio: 2), - (min-resolution: 2dppx), - (min-resolution: 192dpi) - { - background-image: ~"url(@{common-image-const-path}/combo-border-size/BorderSize@2x.png)"; - background-size: 60px auto; - } + .pixel-ratio__2 & { + background-image: ~"url(@{common-image-const-path}/combo-border-size/BorderSize@2x.png)"; } } } diff --git a/apps/spreadsheeteditor/main/resources/less/rightmenu.less b/apps/spreadsheeteditor/main/resources/less/rightmenu.less index ebb997c02..f211f3567 100644 --- a/apps/spreadsheeteditor/main/resources/less/rightmenu.less +++ b/apps/spreadsheeteditor/main/resources/less/rightmenu.less @@ -208,23 +208,14 @@ .combo-border-size.cell-border-type { img, .image { background-image: ~"url(@{app-image-const-path}/toolbar/BorderSize.png)"; + background-size: 60px auto; - @media only screen { - //@media (-webkit-min-device-pixel-ratio: 1.5) and (-webkit-max-device-pixel-ratio: 1.9), - // (min-resolution: 1.5dppx) and (max-resolution: 1.9dppx), - // (min-resolution: 144dpi) and (max-resolution: 191dpi) - //{ - // background-image: ~"url(@{app-image-const-path}/toolbar/BorderSize@1.5x.png)"; - // background-size: 60px auto; - //} + .pixel-ratio__1_5 & { + background-image: ~"url(@{common-image-const-path}/combo-border-size/BorderSize@1.5x.png)"; + } - @media (-webkit-min-device-pixel-ratio: 2), - (min-resolution: 2dppx), - (min-resolution: 192dpi) - { - background-image: ~"url(@{app-image-const-path}/toolbar/BorderSize@2x.png)"; - background-size: 60px auto; - } + .pixel-ratio__2 & { + background-image: ~"url(@{common-image-const-path}/combo-border-size/BorderSize@2x.png)"; } } }