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

Maintain left and right padding when embedded #24

Closed
tungmeister opened this issue Aug 22, 2021 · 5 comments
Closed

Maintain left and right padding when embedded #24

tungmeister opened this issue Aug 22, 2021 · 5 comments
Labels
feature request New feature or request

Comments

@tungmeister
Copy link

tungmeister commented Aug 22, 2021

Hi, I'm wanting to use embedded: true to reduce the vertical padding between multiple instances of the card however when enabled the left and right padding is also lost making the start of the card misaligned with other cards in the view:
image
I had a look at the code and tried adding padding values to:

      .time-picker-row.embedded {
        padding: 0px 16px 16px;
      }

but that made no difference. My JS knowledge is very limited but if you could point me to what I need to tweak I'll adjust it myself.

EDIT: looks like it was just my browser cache misbehaving. This change is doing as I wanted.

@tungmeister tungmeister added the feature request New feature or request label Aug 22, 2021
@MPowerData
Copy link

Is the solution to this below setting?

.time-picker-row.embedded {
padding: 0px 16px 16px;
}

Because this does not appear to be working for me, even after clearing cache.

@tungmeister
Copy link
Author

Is the solution to this below setting?

.time-picker-row.embedded { padding: 0px 16px 16px; }

Because this does not appear to be working for me, even after clearing cache.

did you delete the *.gz version of the card? If you don't that gets used instead so any changes you make to the *.js won't take effect.

@MPowerData
Copy link

Is the solution to this below setting?
.time-picker-row.embedded { padding: 0px 16px 16px; }
Because this does not appear to be working for me, even after clearing cache.

did you delete the *.gz version of the card? If you don't that gets used instead so any changes you make to the *.js won't take effect.

Ah, that indeed was needed. Thanks a lot.

I actually changed it to padding: 0px 16px 0px; for a more condensed look.

@GeorgeSG
Copy link
Owner

GeorgeSG commented Nov 3, 2022

Hi,

If I understand correctly, you have 2 embedded cards - one with embedded: true, one without.

This is the expected default behavior:

  • when you set embedded: true the card expects it's nested/embedded within another card and removes all padding to align with other components that may be around it.
  • when the card does not have embedded: true it acts as if it's a standalone card.

Using embedded: true to reduce vertical padding is a cheat :) I see how it may be something people want though, I'll consider adding a separate option for that.

@GeorgeSG
Copy link
Owner

GeorgeSG commented Nov 3, 2022

Version 1.3.0 adds a thin option that should help.

@GeorgeSG GeorgeSG closed this as completed Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants