Set an aspect ratio for grids (and horizontal and vertical stacks)

Right now I’m using a trick to get all the rows in my UI the same height. I’ve got things working on a what’s essentially a 1x8 grid. I can subdivide that grid into 8 buttons, 2 sets of 4 buttons, or 4 buttons and 2 2 button sets easily, but when I get into 3-button sets, I run into the reason for my request.
In one case, I have 2 sets of 3 and 1 set of 2 which would divide up nicely into the 1x8 grid, but I can’t do that. I have to use 3 set of 3 each and fiddle with the aspect ratio of the buttons so that they’re the right height as well as end up with an empty space I don’t need.
So, what I’d like to do is be able to set a horizontal stack or a grid to a particular aspect ratio. In my example, something like:

  - type: grid
    columns: 3
    aspect_ratio: 3/1
    cards:
      - entity: something...
      ...
  - type: grid
    columns: 3
    aspect_ratio: 3/1
    cards:
      - entity: something...
      ...
  - type: grid
    columns: 2
    aspect_ratio: 2/1
    cards:
      - entity: something...
      ...

and have it nestle into rows of 1x8 or 2-1x4s, etc. maintaining the same height as the non-threes above and below it.