FAC10 / week5-jajascript

Never miss a train leaving from Bethnal Green again
https://week5-jajascript-bethnal-green.herokuapp.com/
5 stars 1 forks source link

Strange decimal values for font-size and padding #63

Closed oliverjam closed 7 years ago

oliverjam commented 7 years ago

Is there any reason you're using really specific decimals like font-size: 1.414rem. This evaluates to 22.624px by default, which might not render properly in some browsers.

It's generally a good idea to stick to whole pixel values. E.g. 1rem = 16px, 1.125rem = 18px, 1.25em = 20px etc

jessicasalmon commented 7 years ago

@oliverjam thanks for the tip, I didn't know that. The fonts were looking a bit out of proportion so I followed a typescale guide (http://type-scale.com/). If you have some time later would appreciate it if you'd look over it with me? :)

oliverjam commented 7 years ago

Sorry I completely missed this on Friday! Type Scale is actually a decent tool, so that explains the decimal values.

I've looked into this and I may have overstated the issue with decimal pixel values — I think most modern browsers do subpixel rendering and round down to the nearest subpixel anyway. You might get a few inconsistencies with certain browsers that round up instead, but it's not really anything to worry about.