It is not doing anything here. It would with the mod above from Darryn, but without as general variable, it is not here.
And I would wonder if it would, because it is not used in the dom at any place for this title here. Are you on any beta version of HA in this test? Iām testing on 11.3
First I would evaluate if something has changed. Because of this my ask above. Can you show a screenshot of the dom part of that title, where the variable is used/assigned, so that I can compare?
card-mod-card-yaml when you have multiple yaml selectors for card-mod. In this example, with only self yaml selector, card-mod-card-yaml is not required.
the syntax used in those classes can be both ways:
:host(.class-clock) ha-card {
background-color: red !important;
border-radius: 20px !important;
}
:host(.type-clock) ha-card {
background-color: red !important;
border-radius: 20px !important;
}
the made up manual (.class-clock) modification is one you can used on selected entities of your choice. By using the method I showed earlier:
card_mod:
class: class-clock
the (.type-clock) is automatically applied to all type clock cards you might have, and doesnt require setting a card_mod on the card at all.
so both have their strengths.
Manual selection and be specific
Auto application and be generic
card-mod-root-yaml: |
.: |
{# center the view tabs when in potrait mode to make 1 column visually #}
@media (orientation: portrait) or (max-width: 850px) {
.toolbar ha-tab-group {
display: flex;
justify-content: center;
}
}
no longer works in the sense that it wont scroll the views in the dashboard anymore if there are more than a few, wider than the view.
taking out the display: flex; makes all views scroll again, but alas, also stops centering the views above my single column views.
I suppose this might be a styling challenge, and not an issue (read bug)
would appreciate a second pari of eyes, and maybe a hint how to fix this.
thanks for having a look
You can set the justification of the tabs in the tabs part exposed by ha-tab-group
card-mod-root-yaml: |
.: |
{# center the view tabs when in potrait mode to make 1 column visually #}
@media (orientation: portrait) or (max-width: 850px) {
.toolbar ha-tab-group::part(tabs) {
justify-content: center;
}
}
Thanks also for the complement.
I stil have a problem using theme, maybe due to the fact that the clock card is encasulated in a streamline-card.
I make some tests today.
Rgds
Sharing a theme config (v4) which makes sure that styled cards to not display, or even custom cards that donāt support preview properly (e.g. current official auto-entities with no entities and show_empty: false) will always show at least one row high in sections dasboard.
Try :host(.type-custom-mini-graph-card) ha-card.e10_graph.flex. I am assuming that the Mini Graph Card is placing its classes on ha-card. card_mod will now place .type-custom-mini-graph-card on the card itself.
If you need more assistance, please share a minimal config or DOM tree from Browser dveloper mode.
just was confronted with the reason I didnt use border-radius-square once againā¦
itās not supported on all Frontend stock vars⦠which is plain silly of course.
all cant be set with it (and now I leave that commented in my theme so I dont forget)
reason: border-radius-square is set to 0, and not 0px
I did chat about that with the Frontend devs when that var was introduced, but they simply take the pov that 0 is default in CSS and 0px would be incorrect.