I have a horizontal stack card with multiple custom button cards. There is a condition in these cards that shows/hides the status. When the status is shown, the card becomes wider, and as a result, the mobile app has a horizontal scroll. Is there any way or card type where I can paste a set of custom button cards, and depending on their width, the line between them will break to avoid horizontal scrolling?
Revisiting this topic because the previous solution worked great for me until the latest update, after which it stopped working. I suspect the issue might be that applying styles directly to a horizontal-stack card now requires using the card_mod: style approach, but I havenβt been able to get it to work correctly. Has anyone found a reliable method or workaround for this?
Up until now this has wrapped the elements, braking to a new row when reaching overflow-x. After updating, I have gotten a border shadow that I have not had before, and none of the card_mod styles seem to be applied anymore.
Also, v4 allows to remove mod-card as stacks and grids can now be styled directly. So would be able to add card_mod direct to a stack and style #root as a direct string style with no shadowRoot selector required. With a few less steps (load mod-card, card_mod to find hui-horizontal-stack-card shadow, it will be a wee bit more efficient.
Of course, with 4.0.0 you may apply card-mod directly to vertical-stack (i.e. w/o mod-card) as was described in Release notes (a recommended way if you write a code anew):