button-text-card icon indicating copy to clipboard operation
button-text-card copied to clipboard

Change size of actual button?

Open kenstone opened this issue 5 years ago • 5 comments

Is there a way to change the size of the actual button? Not just the size of the icon inside the button. I'm looking at the https://github.com/custom-cards/button-card which has a style property that allows for changing the dimensions of the actual button.

kenstone avatar May 26 '20 21:05 kenstone

Right now, that's not possible. Good suggestion! Can you take this up? Otherwise, I'll plan it when I have some spare time.

Savjee avatar May 28 '20 13:05 Savjee

Sounds good. I'll give it a go.

kenstone avatar May 28 '20 21:05 kenstone

Hi,

just looking for this, is it possible to change card size?

I've tried using card_mod but doesn't seem to work as the card just gets cut off.

Thanks!

luixal avatar May 21 '23 10:05 luixal

Not at this moment, sorry.

Savjee avatar May 22 '23 07:05 Savjee

Ok, just in case someone gets here and really needs it, this is how I managed to change its size.

Let's take this one as an example:

type: custom:button-text-card
title: Example
subtitle: Larger example text
icon: mdi:home
large: true
font_color: white
background_color: blue

I tweaked it using card_mod, like this:

type: custom:button-text-card
title: Example
subtitle: Larger example text
icon: mdi:home
large: true
font_color: white
background_color: blue
style: |
  .flex-container {
    padding: 12px 0px 12px;
    height: 45px;
  }

  .icon-container, .text-container {
    height: 100% !important;
  }

Hope it helps someone :)

luixal avatar May 22 '23 08:05 luixal