Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change size of actual button? #29

Open
kenstone opened this issue May 26, 2020 · 5 comments
Open

Change size of actual button? #29

kenstone opened this issue May 26, 2020 · 5 comments
Assignees

Comments

@kenstone
Copy link

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.

@Savjee
Copy link
Owner

Savjee commented May 28, 2020

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

@kenstone
Copy link
Author

Sounds good. I'll give it a go.

kenstone added a commit to kenstone/button-text-card that referenced this issue May 29, 2020
Adds Savjee#29. New properties on the button `width`,`height`. By default
the fields are set to 85px. Properties are on the actual button part
of the card, not the card as a whole.

Also, changed cursor to `pointer` when using a mouse.

Slight tweaks to README
kenstone added a commit to kenstone/button-text-card that referenced this issue May 29, 2020
Adds Savjee#29. New properties on the button `width`,`height`. By default
the fields are set to 85px. Properties are on the actual button part
of the card, not the card as a whole.

Also, changed cursor to `pointer` when using a mouse.

Slight tweaks to README
@luixal
Copy link

luixal commented May 21, 2023

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!

@Savjee
Copy link
Owner

Savjee commented May 22, 2023

Not at this moment, sorry.

@luixal
Copy link

luixal commented May 22, 2023

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants