i tried letter-spacing: -.02 em and i like it. but does -.002 work? is there a limit on the decimal things? maybe they arent called points but someone has to know what im refering to okthxbai

Dani AI

Generated

Good question — CSS accepts fractional lengths, but whether a tiny decimal produces a visible change is down to the browser, the font, and the device pixel mapping. The spec permits decimal fractions for length tokens, so values with several decimal places are syntactically valid; actual rendering depends on layout math and how CSS pixels map to device pixels. See the spec for lengths and the letter‑spacing property for the formal details: CSS Values and Units — lengths and MDN — letter-spacing.

Browsers perform layout with finite numeric precision and then rasterize text to the screen; that rasterization (font hinting, antialiasing, and device pixel grid) determines whether sub‑pixel spacing survives. High‑DPI screens and different OS font renderers can make small fractional changes more or less noticeable. For background on device scaling that affects how fine-grained spacing appears, see window.devicePixelRatio on MDN.

Practical guidance:

  • Treat very small decimals as experimental. Test the exact font, size, and target browsers before committing.
  • Use DevTools to tweak spacing live and inspect the computed value, then check screenshots at the real device scale (including HiDPI) to confirm visual effect.
  • If micro-tracking causes overlap or inconsistent results, consider adjusting font size, switching the font, or using slightly larger spacing steps so results are reliable across platforms.

This builds on the observations in the thread: raised the browser/resize angle, and noted that small adjustments changed the look on their page — both exactly the issues to verify when using tiny fractional em values.

Recommended Answers

All 2 Replies

i tried letter-spacing: -.02 em and i like it. but does -.002 work? is there a limit on the decimal things? maybe they arent called points but someone has to know what im refering to okthxbai

"em" was made for print media, but since IE won't allow users to resize text that is sized by pixels, "em" has become a good way to size fonts for web pages.

The default size for "medium" text is 16px, making 1em = 16px.

Reducing that by 1percent would make a difference of less than one-fifth of a pixel. Useful? I think not.

"em" was made for print media, but since IE won't allow users to resize text that is sized by pixels, "em" has become a good way to size fonts for web pages.

The default size for "medium" text is 16px, making 1em = 16px.

Reducing that by 1percent would make a difference of less than one-fifth of a pixel. Useful? I think not.

its really use ful for me on my page im doing lately. because with -1px the letters where running into each other and -.02em the letters where a bit spaced more

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.