I would like to reduce the horizontal gap between the icon and the name of the entity:
I tried many many things, up to some random desperated code . But nothing works. Iām just able with chrome developer tool to change the value on-the-fly of margin-inline-start to 2px (for example) and it makes the trick
If someone could point me what to change in my card_mod style, it would be much appreciated
You need to apply your style to the entity, not the card. Unfortunately, this means repeating it for every single entity, but you can get round this with YAML anchors.
First of all, dial down your tone. It comes across as rude and confrontational.
Secondly, perhaps you would be so good as to show how this particular setting - the margin on the info div - can be styled from the card level, given itās inside a shsdow-root, and that the dom path varies according to the type of entity on the card.
If you definite answer is wrong and missleading, it should be allowed to say it. Otherwise other will think it is right, what is not the case. I did not say anything else or rude. Only that your answer is wrong as it is.
As you said, it is in a shadow root. So you can apply it with this info from card level as well. With the benefits, that it is then applied to all (if existing) entities with the same struture in this card.
In case it woule be a cover entity, you would do just this on card level
In general, it is possible to define styles for a row from a cardās level, but some thing should be taken into account:
Rows may have a different type. May be solved by using smth like āfirst-childā.
A āline breakā should be added in a proper place to iterate all rows.
Repeating same styles for many rows may be achieved by yaml-anchors, !include, secrets (I proposed using secrets in this thread and later convinced not to use secrets for card-mod). But this only works in yaml.
In some cases it is more reliable to define a style on a row level than on a cardās level. Faced issues with the cardās level sometimes.
I.e. this is all flexible, everyone may find a good way.
Then you misread my answer - note I said āyour styleā i.e meaning this particular setting (the div margin). It was not intended as a definitive statement about where styles should be set on entity cards.
And your solution only applies to cover entities - what if the OP wants to apply it to other types of entity on the same card? Should I be saying your answer is 'completely wrong and misleading '?
I apologize for inadvertently sparking a minor disagreement, but regardless, even the first answer pointing me the trick hui-generic-entity-row + div.info worked for my atomic example.
I also understand that it could be evident to find it for some people (or a more generic or beautiful way to do it), but for someone like myself, I literally spent cumulated 8H toying to finally have no result
Therefore, I extend a heartfelt THANK YOU for not only providing the solution but also accompanying it with explanations
Such a subtle thing on a classical built-in component will undoubtedly help many other HA users
Really like the sections. It fixes a problem with Nest Hub calculating masonry layout. I see one problem though which Iām not sure how to handle. The grid-section-min-width is set to 320px for the responsive design which mean only two columns will be used for Google Nest hub (1024x600). Is it any possibility to override the value using card-mod on the section? Using Chrome I can try to override it and it works perfectly with 290px for instance but Iām not sure how to do it in CSS
I have card-mod installed via HACS and config component and resources component all added but none of the styling options are working on any cards, I canāt seem to troubleshoot why.
From console it seems it is getting loaded correctly, however there are numerous errors that i believe is related to card-mod. See screenshots below, happy to provide more info that you need.
I have tried uninstalling and reinstalling a couple of times, cleared cache, tried old and new formatting for styles etc. no luck.
Any and all help is appreciated.
Edit: Looks like it is working on some cards when I view the dashboard on my android mobile/tablet HA app, but not on the desktop (chrome). card-mod is not working on any of the mushroom cards anywhere, mushroom-entities and mushroom-chip card in a custom:stack-in-card. card mod works on normal entities, button, mini-graph and even the custom:stack-in-card but not on the mushroom cards.
Card-Mod was most likely working, just needed some additional mod entries under the mushroom cards.
The chips card mod need less indention than you had.
I believe this is the look you were going for. You need to use !important to change some of the settings you were trying to change. (especially color).
Stack in card works well with Layout card in grid mode to give you a lot of control over the columns in a grid rows. You can do multiple columns and control the space the use with grid-template-columns:1fr 1fr 1fr or grid-template-columns: 30% 40% 30%
Thank You, the edits you provided has fixed most of the issues. A big thank for the the layout-card suggestion, I am familiar with grids which I have used extensively for my tablet dashboard using custom:button-card templates, I will try out the layout-card and experiment with them for this.
Two still remain,
The chip card is still not showing the styles applied,
Still only visible on my android or fire devices and not on the Chrome on desktop.
Since this is primarily a mobile dashboard issue #2 is fine for now, but I am not sure what I can do to fix this for long term.
What am I doing wrong for the chip card - the screenshot below is form my phone and as you can see, the chip (on the 1st room card) is still showing the borders. Ignore the second version of the Alex Room - havenāt applied edits to it yet.