From dc7fc0c023991955289575efd0d5d1e5669ef4f0 Mon Sep 17 00:00:00 2001 From: lukevink Date: Tue, 11 May 2021 09:59:21 +0200 Subject: [PATCH] Fixed mobile icons --- button_card_templates.yaml | 35 ++++++++++++++++++++++++++++++++++- ui-lovelace_mobile.yaml | 2 +- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/button_card_templates.yaml b/button_card_templates.yaml index a6b1777..bbc404d 100755 --- a/button_card_templates.yaml +++ b/button_card_templates.yaml @@ -1,5 +1,35 @@ # !toggle word-wrap + ################################################# + # # + # MAIN CSS # + # # + ################################################# + + + icon_main: + styles: + icon: + - display: flex + extra_styles: | + .ha-card.button-card-main{ + padding: 0 !important; + } + @media + only screen and (-webkit-min-device-pixel-ratio: 2), + only screen and ( min--moz-device-pixel-ratio: 2), + only screen and ( -o-min-device-pixel-ratio: 2/1), + only screen and ( min-device-pixel-ratio: 2), + only screen and ( min-resolution: 192dpi), + only screen and ( min-resolution: 2dppx) { + + /* Retina-specific screens */ + .ha-card.button-card-main{ + padding: 0 !important; + } + + } + ################################################# # # # CIRCLE # @@ -34,7 +64,7 @@ ]]] styles: custom_fields: - circle: &person + circle: - top: 0% - left: 0% - width: 4vw @@ -51,6 +81,7 @@ light: template: + - icon_main - circle show_state: false show_icon: true @@ -210,6 +241,7 @@ light_group: icon: mdi:google-circles-communities template: + - icon_main - circle show_state: false show_icon: true @@ -285,6 +317,7 @@ light_white: template: + - icon_main - circle show_state: false show_icon: true diff --git a/ui-lovelace_mobile.yaml b/ui-lovelace_mobile.yaml index db19e86..720fbd3 100755 --- a/ui-lovelace_mobile.yaml +++ b/ui-lovelace_mobile.yaml @@ -1043,7 +1043,7 @@ views: type: 'custom:button-card' styles: card: - - transform: 'scaleX(-0.7) scaleY(0.7)' + - transform: 'scaleX(-1.8) scaleY(1.8)' style: left: 65% top: 17%