Hi, I'm an old webdev who is rusty in CSS; I learn about calc() recently and never really learnt display: flex properly.
I made some webs with a responsive menu layout (relevant CSS code posted on bottom). I tried using flex but I still had to do one ugly hack: I have the menu heights for the different resolutions hardcoded and I have to update them manually every time a new chapter is added. It's not a big deal, but I would like to know if there is a proper way to do this.
Some alternatives I've thought about:
The new round(), but it's too new and not supported by most browsers.
JavaScript
... but I feel like there must be a clean CSS-only way to achieve this.
I’m a web dev turned DevOps (with the front end design eye and CSS knowledge of a DevOps! Lol) but this seems like a great place to use a css grid, no?
It's hard to explain with words, I'm trying to adjust the number of columns depending on the available width. But (probably because I don't know how to use display: grid) the only way I found was to set a fixed height for each "step".
In other words: I trying to achieve the exact behavior it has right now.