7

I'm generally new to front end development, couldn't keep up with the eco system even if I wanted to.

But what the fuck am I supposed to do when UX gives me mock ups in absolute units of pixels?

I thought best practice was for development was like vw viewport units of em units, because of the wrinkle of supporting different screen sizes and devices.

Is the general industry practice I'm supposed to use their general ratios and just get close enough? Like I don't want to dick around for diminishing returns trying to get shit pixel perfect, I don't have an eye for this shit to begin with.

Comments
  • 1
    Ask for more directions.

    Could be how it should look for any given width between two given breakpoints but it could also be responsive.
  • 0
    I would just size ur screen to the same sizes as ur mocks, and then use computed values to get ur sizes right.

    As for best practices, I am on the side of the debate that uses just pixels for padding and margin just because it sizes better with zooming AND user agent font increases. There is situations where I will use responsive sizing, but it’s usually more of a headache to get right.
  • 1
    Simple - use rem. Assume the browser default that 1rem = 16px, from there on you can just convert units as you go along.
  • 0
    @phat-lasagna that's what I used to do. If they're desktop screens then resize to 1920 width, use percentage until it hits the pixels requested.
  • 1
    @Crost then I used box sizing in css so that padding didn't throw things off
  • 0
    @Crost yeah imo if you use relative units or any dynamic units for padding you are going agains the fundamentals of the box model itself.
Add Comment