Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I 2nd the request for jsfiddle / codepen for comparison. Not a css grid expert here - haven't had great luck with css grid responsive design without a bunch of media queries.


Are you using variable size fonts? Or are you having to do the paint by numbers thing with a design handed down to you?

So much of CSS grid is challenging to the ways pages have been written. Try getting desktop to work and then using CSS variables defined in your media queries so you only have the one set of CSS rules, with just the bits that change in the media queries.

This way is much more succinct and you know what bits change as those are the bits with the variables in them.

I recommend that you just give it a go on tables, next time you need to. I think it just needs judicious use of display:contents on the header and rows for it to fall into place. That and the CSS variables approach should get you there and the problem can be solved in a two step process.

I would not dream of styling up a table or anything else that needs to be in rows/columns any other way, previous approaches have been too fragile for me.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: