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

> I think your solution is very close but breaks when I scale down the width of my viewport. If I set Chrome dev to iPhone 12 Pro or iPhone SE, for example, the chess board starts getting cut off.

Hmm... what would you like it to do in that case? Start shrinking the height? You can try adding `max-width: 100%` to the tall rectangle.



I’ll try tomorrow at a PC.

Yeah I think so. The idea is to fill as much of the viewport as possible but always maintain aspect ratio. Oh did I describe the challenge/problem poorly maybe? Sorry!

Still, you’ve gotten closer than I.




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

Search: