thedayhascome / Fluid-Baseline-Grid

HTML5 & CSS3 development kit that provides a solid foundation to quickly design websites with ease.
http://fluidbaselinegrid.com
The Unlicense
247 stars 58 forks source link

decimal places in em units #2

Closed krisbulman closed 12 years ago

krisbulman commented 12 years ago

What is the benefit of using values with an extreme amount of decimal places in your vertical rhythm output:

example: 1.1428571428571428571428571428571em

Is there any real difference from just using a rounded up number such as 1.143em ?

thedayhascome commented 12 years ago

The amount of decimals places to where browsers round is inconsistent. See John Resig's Sub-Pixel Problems in CSS. Therefore, I prefer to give them all the information that I can, and let the browser choose how it rounds and handles the calculation.

With that being said, 3 decimals places would probably be sufficient. I just prefer to be obsessively accurate. It's also a technique inherited from Ethan Marcotte.

krisbulman commented 12 years ago

Thanks, the reason I ask is because I have been converting it to sass/compass & the included vertical rhythm mixins only support up to 3 decimal places. I have yet to check if it's possible to increase the amount of decimal places though.