W3C home > Mailing lists > Public > www-style@w3.org > May 2016

Re: [dip] Proposal for display size and density independent pixel.

From: Florian Rivoal <florian@rivoal.net>
Date: Wed, 25 May 2016 16:41:05 +0900
Cc: www-style@w3.org
Message-Id: <2D7DDAD3-A850-469F-AF18-716029910FA9@rivoal.net>
To: prashant.n@samsung.com

I believe that the use cases your are thinking about are already addressed in specifications by the @viewport rule (maybe in combination with media queries, depending on the situation).

Unfortunately, this is not yet supported in most browsers. At the moment, only IE and Edge support it, and they support it on desktop and mobile. Opera Mobile <= 12 also does but that's not a very relevant browser these days.


Could you please refer to that specification, and see it it would solve your problems?

 - Florian

> On May 25, 2016, at 12:19, Prashant Kisanrao Nevase <prashant.n@samsung.com> wrote:
> Dear CSS Working Group,
> There are many displays for different devices available for rendering the contents. e.g. big screens, projected screens, TVs, computer monitors, tablets, IVI displays, phablets, phones, wearables, etc. These displays have different sizes and different resolutions and number of pixels or dots per inch (display pixel density or simply called display density) varies for different displays. Due to this writing the contents which will work across different displays seamlessly or with less modification has become difficult and content developer has to consider many different displays e.g. different contents for mobile devices, desktop monitors, etc.
> I want to propose "pixel", making it independent of "display size" and "display densities". Many mobile platforms (Android, iOS, WinMo, Tizen, etc.) support display density independent pixel, but display size (pixels measured diagonally) is not taken care any of the platform. Hence contents rendered gets occupied differently on different displays. Also desktop platforms do not support this. So web page opened on 12 inches display looks different than it opened on 21 inches display.
> Making this css standard will help web pages render with similar layout on any display.
> It proposes having new meta name "pixel" as given below -
> <meta name="pixel" content="baseline-density=640;" ></div>
> Then pixel scale factor for computing DIP (display independent pixel) is as given below -
> device_baseline_density = baseline_density / display_size;
> pixel_scale_factor = dots_per_inch / device_baseline_density;
> where
> baseline_density = Value of baseline-density property [input from web page]
> display_size = Display size in inches (measured diagonally) [taken from platform]
> device_baseline_density = Baseline density for the target display on which web page is to be rendered. [output]
> dots_per_inch = Number of pixels per inch on the target display. [taken from platform]
> pixel_scale_factor = Scale factor for pixel for target display [output]
> By multiplying the css pixel by pixel scale factor, we get similar layouts for the contents.
> For more details, kindly have a look at 
> https://github.com/prashant-samsung/dip/ <https://github.com/prashant-samsung/dip/>
> ~ Prashant Nevase
> <201605250850950_4XEV4D4T.gif>

Received on Wednesday, 25 May 2016 07:41:32 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:59 UTC