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

Card does not scale properly #57

Open
tallen-harper opened this issue May 30, 2022 · 3 comments
Open

Card does not scale properly #57

tallen-harper opened this issue May 30, 2022 · 3 comments

Comments

@tallen-harper
Copy link

When nested in a horizontal stack in particular, the gauge does not scale correctly taking up the full horizontal width of the outer card instead of scaling to fit the inner card:

Screen Shot 2022-05-30 at 10 50 05 am

@offbyone
Copy link

Urk. Yep, I've seen this too; I'm using it in a grid and the same problem:

image

@trentjw
Copy link

trentjw commented Mar 6, 2023

same issue with me as well

@igorsantos07
Copy link

igorsantos07 commented Aug 6, 2024

This could be partially mitigated if you use viewport units together with card_mod:

card_mod:
  style: |
    .gauge-dual-card {
      --gauge-card-width: 14vw
    }

This could be easily implemented in the card by checking if cardwidth is a number - if so, use as pixels, otherwise, use raw (expecting the unit to come after it). A regex could be used to further validate this: /^\d+\w{1,4}$/.

It's still not the best result, as it gets out of proportion and text may get way too small, but at least it's not unreadable as in your screenshot (and my dashboard haha).

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

No branches or pull requests

4 participants