Hacker News new | past | comments | ask | show | jobs | submit login

Doesn't look "great" on mobile. 2rem margins are way too big for a phone screen. Too much wasted space.

2vw would be a reasonable substitution, as it creates a dynamic margin, based on the screen's "view width". Smaller screens → smaller margins.

Thanks for bringing vw to my attention, it sounds great! I tried it out and the main problem is 2vw looks much more reasonable on many mobile displays, but puts a lot of top margin on wide screens (laptops/monitors). I still want to retain the same size margins for top/bottom and left/right, so a happier medium would be to vw for mobile and rem for tablets/laptops/monitors, but then that's too much trouble for diminishing returns in my opinion.

Just use 1rem everywhere. There is no reason for the hideously large 2rem margin. Another person said it's just opinion, but I'm sure 9 out of 10 users would tell you 1rem is the better looking option overall.

There is `vh` as well, it works the same way, but instead of working relative to viewport width vw, it works relative to viewport height vh.

That's just opinion. As long as it's not hugging the edge it's fine, it's erring in the side of caution at best.

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