whats the parameter for vertical gaps?
Exactly where is this code added? I’m not using any themes.
This takes care of the vertical gap between cards; but not the excessive width at the left and right margin of the dashboard. The result is to shrink the columns, which, in my layout, causes some of the text and information in the card to be truncated.
I don’t mind working within a theme; is there a theme variable that will shrink/modify the width of columns in the layout, or shrink the left and right margins?
I’ve been trying to find a solution for this, and I think I have, The first screen shot is for no theme:
Second one is with this theme:
ImprovedSections:
ha-view-sections-column-gap: 8px
And the last one is with this one:
ImprovedSections:
ha-view-sections-column-gap: 8px
ha-view-sections-column-min-width: 430px
Adjust the min-width to your screen, this may mass up the view on other devices, but I make my dashboard for a specific devica, so this is for PC, for tablet and phones I use different dashboards.
This worked perfectly. Many Thanks.
This doesn’t seem to work anymore with Home Assistant 2024.10 beta. Can anyone confirm?
Haven’t tested the beta, but it’s working fine for me on 2024.9. Will wait for the stable release to try a solution if so.
Does this still work for you with 2024.10?
It does, yes.
When I add this line to the theme I use (Material Rounded Theme), nothing changes.
changing ha-view-sections-column-min-width does absolutely nothing
Works here in 2024.11. Try to change that to 1px. You must run “frontend.reload_themes” after each change though…
I figured this one out: the Material Rounded theme file consists of multiple themes. I added the CSS changes to the wrong theme. Adding it to the correct theme does wonders.
Could you tell me where do we add this?
To adjust the ha-view-sections-column-gap
setting, you need to create a new custom theme in Home Assistant. Follow these steps:
- Open your
configuration.yaml
file. - Add a new theme under the
frontend
section. - Reload your YAML configuration to apply the changes.
- Apply the new theme on your dashboard.
Here’s an example configuration:
# Load frontend themes from the themes folder
frontend:
themes:
MySection:
ha-view-sections-column-gap: 8px
For more information about Home Assistant theme configuration, refer to the official documentation.
Yes, this removes the gap betweenthe sections (after selecting the theme).
But this also remove the defautl Home Assistant theme and thus the ability to select Dark mode:
How to solve that?
Genius, tnx!!!
Very Good!
You may wanna vote for it here: