The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › decimal pixel values for text-shadow?
I’ve used decimal px values on occasion, but on a whim I just tried it on text-shadow and was quite surprised at the result
color: #c8c8c8; background-color: #fff; font-size: 18px; text-shadow: 0.1px 0.5px 0px #666;
Any thoughts on using decimal px values? It goes a long way towards making my text-shadows pop without looking over-bearing. -Michael
Unfortunately, it’s not actually doing anything. If you replace 0.1px and 0.5px with 0px it will look the exact same.
Here’s the example: http://codepen.io/ggilmore/pen/rybeL
And a screenshot: http://cl.ly/image/0r0q123a2v38 Top: decimals Middle: 0px Bottom: 1px
Ah yes, I was looking in Chrome. I’d imagine Safari and IE act similarly.
Firefox is dealing with sub-pixels. Not others major browsers as far as I can tell.
Very cool idea, @andy_unleash.