I'm not sure if you are joking, but the answer is: you don't :-)
N-gon grids don't make sense for N other than 3, 4, and 6 [1]. N=4 is easy, N=6 is in the OP. I suspect one could find a similar "css trick" for N=3.
1: https://en.wikipedia.org/wiki/List_of_regular_polytopes_and_...