csswizardry-grids icon indicating copy to clipboard operation
csswizardry-grids copied to clipboard

letter-spacing issue on the grid / grid__item

Open anthwinter opened this issue 11 years ago • 5 comments

In Chrome 32.0.1700.102, I have noticed that the letter-spacing value of -0.31em has some problems. It makes the grid__item appear 1px smaller in width than you define.

It seems assigning the value of -0.25em, instead of -0.31em, fixes the problem.

I have set up a pen here: http://cdpn.io/EzqDe

anthwinter avatar Feb 03 '14 12:02 anthwinter

This is a known issue with this method, I'm working on a fork that uses display: flexwith the current ìnline-block`-grid as a fallback to circumvent this issue once and for all for all modern browsers.

fspoettel avatar Feb 09 '14 16:02 fspoettel

I've just been looking into this issue and found that applying both the font-size: 0; fix with letter-spacing: -0.31em; seems to work well across devices and browsers. It seems that the font-size fix takes priority and removes the whitespace correct but for older versions of Android which has a known issue with the font-size fix they fall back to the letter spacing solution.

I'm going to do some further testing across more devices and browsers to be sure. I'll let you know if I find anything different.

shaunbent avatar Feb 20 '14 12:02 shaunbent

I've been looking into this too:

http://demo.gridlight-design.co.uk/inline-block-spacing.html

HTH

andykirk avatar Feb 20 '14 13:02 andykirk

Whats if .grid { letter-spacing: -$gutter; } ?

Krknv avatar Mar 21 '14 08:03 Krknv

In one forum I read that settings the font-size to 0.1px on the .grid might work.

Zlate avatar Aug 30 '16 04:08 Zlate