ofekashery / vertical-stack-in-card

📐 Home Assistant Card: Group multiple cards into a single sleek card.
MIT License
897 stars 79 forks source link

Fix margin+padding between title and sub-cards #130

Open ThomDietrich opened 2 years ago

ThomDietrich commented 2 years ago

Hey there, Assuming that vertical-stack-in-card should behave and feel identical to the core cards, there is one very obvious difference:

image

The distance between the title and the first card should certainly be reduced. Equally I would argue to reduce the distance between cards, however I understand that this might squish certain card types together unpleasantly!?

I was able to resolve this by adding the following CSS rule (as applied in the core source). I am not a CSS expert, so please evaluate whether it's the best solution. Thanks!!

vertical-stack-in-card div#states.card-content {
  margin-top: -8px;
  padding-top: 0px;
}
kalhimeo commented 1 year ago

Thank you, I was looking for exactly this. Any expert who could point me how to achieve the same for a specific card using card-mod (or maybe the card "styles" option) ? Thank you !