Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Relative Units best suitable with restricted unit value or unending value

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #45041
    dhanushbadge
    Member

    Hello Everyone,
    I have been developing lots of websites, and I stumble upon many high profile websites & try to conclude whether using relative units (ems in my case) with restricted value is good, or should we just copy+paste whatever the value calc shows us in ems (too lenghty).

    To be precise,
    18px รท 13px =
    1.3846153em _(is okay OR)_ 1.38em

    Thanks in Advance, all feedback’s appreciated…

    #136299
    CrocoDillon
    Participant

    I’ve used up to 3 or 4 decimal digits with font sizes which worked pretty well (for fluid layout however I had to use 6 decimal digits with % width or else Chrome would mess up). For font sizes I think the whole point of ems is not to have to think about pixels anymore, so having a ton of digits to get a nice round pixel value based on a default of 16px wouldn’t make sense.

    #136311
    dhanushbadge
    Member

    I agree the point you have made, but also there are many who do the calculations & include those tons into css, and let browsers decide, where to shrink those decimals.

    Just like you, I personally prefer deciding the value myself instead of letting browsers to decide (which may vary browser-to-browser), but then again, was wondering why many big company developers still make it a point to go that extra mile to include tons of post decimal values!

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