W3C home > Mailing lists > Public > www-style@w3.org > November 2014

Re: [mediaqueries] Media Source Extensions and device capabilities

From: L. David Baron <dbaron@dbaron.org>
Date: Fri, 14 Nov 2014 09:13:24 -0800
To: Mark Watson <watsonm@netflix.com>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <20141114171324.GA16777@crum.dbaron.org>
On Tuesday 2014-09-23 09:22 -0700, Mark Watson wrote:
> I am not really a CSS expert, so that is why I posted the underlying
> requirement without presuming a CSS solution.
> 
> But, naively, I would think that if we had a "device pixels" unit (dpx)
> corresponding to physical device pixels, we could construct a media query
> along the lines of "min-height: 1080dpx". This could be used to annotate a
> <source> element on an HTMLMediaElement or with window.mediaMatch() to
> obtain events as the window is moved to / from displays with HD resolution.

Are these media queries evaluated as they normally are (e.g.,
'width' being evaluated against the size of the viewport,
'device-width' against the device size), or are they evaluated
against the size of the video element?

I could certainly imagine the group being less concerned about
device pixels being used as a unit in media queries if the media
query were a (media-width) query that queried against the size of
the HTML media element and were specific to media selection, rather
than a (width) query that queries against the size of the viewport?
Or is there an infinite loop there in that the size of the media
element might be determined by the resource selection?

Then again, I probably wouldn't be against just having a separate
unit for device pixels (or, for that matter, for true lengths),
although I'm not sure I like 'dpx' as the name (looks too much like
'dpi').

(The idea of a separate media query for the size of the video is
appealing to me, at least, since it avoids the potential authoring
problem of authors querying on the size of the viewport when they
should actually be querying against a smaller area.  This whole
thing is somewhat related to the thread on "element queries" that I
believe occurred earlier, but less complex.)

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                          https://www.mozilla.org/   𝄂
             Before I built a wall I'd ask to know
             What I was walling in or walling out,
             And to whom I was like to give offense.
               - Robert Frost, Mending Wall (1914)

Received on Friday, 14 November 2014 17:13:53 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:26 UTC