Grow your CSS skills. Land your dream job.

Issues with Chrome 26 – DIP instead of CSS pixel?

  • # April 26, 2013 at 12:04 pm

    Hi all,

    I have some issues with the latest version (26.0.1410.58) of Chrome for Android.
    It seems that Chrome uses DIP (device independent pixel) for all CSS related values.

    If so, this would be without doubt totally wrong!

    This becomes an issue as soon as you are on a device which device pixel ratio is greater than 1.0.
    I tested this on a Samsung Galaxy S (GT-I9000). And Chrome is the only browser which is doing it all wrong. Android’s native Browser, which is also based on Webkit, is doing fine.

    So I wonder if anyone can confirm this behaviour?

    Here is a link for a quick online check: http://responsejs.com/labs/dimensions/

    Steps to reproduce the problem:
    1. Use a device with a device pixel ratio > 1.0
    2. Set e.g. the width of an image to the width of your screen in pixel

    What is the expected behavior?
    The image width should equal to width = 100%

    What went wrong?
    The image is displayed larger (multiplied by the device pixel ratio)

    Many thanks in advance,

    Gunther

    # April 26, 2013 at 12:09 pm

    I don’t know that Android is doing it wrong…they are doing it differently though.

    >…on the Android operating system a device-independent pixel is equivalent to one physical pixel on a 160 dpi screen, while the Windows Presentation Foundation specifies one device independent pixel as equivalent to 1/96th of an inch.

    # April 26, 2013 at 12:13 pm

    It should also be borne in mind that Chrome measures screen width differently from all other browsers..as it treats a scrollbar differently.

    # April 26, 2013 at 12:55 pm

    Well the point is that interpreting CSS given values as DIP is without doubt *wrong*.
    So I am not talking about DIP itself or any other (minor) differences.

    # April 26, 2013 at 2:43 pm

    I opened an issue for this: http://code.google.com/p/chromium/issues/detail?id=235845

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".