Forums

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?

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #40028
    mmcgu1966
    Participant

    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

    #110866
    TheDoc
    Member

    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

    #110868
    TheDoc
    Member

    Ah yes, I was looking in Chrome. I’d imagine Safari and IE act similarly.

    #110882
    Kitty Giraudel
    Participant

    Firefox is dealing with sub-pixels. Not others major browsers as far as I can tell.

    #110914
    TheDoc
    Member

    Very cool idea, @andy_unleash.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘CSS’ is closed to new topics and replies.