Skip to content

Commit

Permalink
Fixed mobile icons
Browse files Browse the repository at this point in the history
  • Loading branch information
lukevink committed May 11, 2021
1 parent f94e794 commit dc7fc0c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
35 changes: 34 additions & 1 deletion button_card_templates.yaml
Original file line number Diff line number Diff line change
@@ -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 #
Expand Down Expand Up @@ -34,7 +64,7 @@
]]]
styles:
custom_fields:
circle: &person
circle:
- top: 0%
- left: 0%
- width: 4vw
Expand All @@ -51,6 +81,7 @@

light:
template:
- icon_main
- circle
show_state: false
show_icon: true
Expand Down Expand Up @@ -210,6 +241,7 @@
light_group:
icon: mdi:google-circles-communities
template:
- icon_main
- circle
show_state: false
show_icon: true
Expand Down Expand Up @@ -285,6 +317,7 @@

light_white:
template:
- icon_main
- circle
show_state: false
show_icon: true
Expand Down
2 changes: 1 addition & 1 deletion ui-lovelace_mobile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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%
Expand Down

0 comments on commit dc7fc0c

Please sign in to comment.