W3C home > Mailing lists > Public > whatwg@whatwg.org > December 2016

Re: [whatwg] Media query for bandwidth ??

From: Jonathan Garbee <jonathan@garbee.me>
Date: Fri, 09 Dec 2016 19:51:17 +0000
Message-ID: <CANCFA+H4kAwTodHL-jOSKMp7deejbftE4s0XNfWU5L+yC2jFhA@mail.gmail.com>
To: "Michael A. Peters" <mpeters@domblogger.net>, whatwg@lists.whatwg.org
FTR there was a working group to provide a Network Information API [1] to
let JS handle this more easily. In trying to do that, they had a difficult
time actually getting accurate information for the API to provide. So it
was canned in order to further assess the cases specifically and other
approaches. I highly doubt if there was trouble building a JS API for this
type of thing that CSS alone can handle it in some way.

If something like this is to happen, it *needs* to happen in JS first. That
way developers have control, from a working and proven implementation there
we could find a syntax for CSS to work on top of. So for now, you're
probably best off polyfilling some JS API and using that to experiment with
to present as a solution. That way it can be more easily vetted and tested.

[1] https://dvcs.w3.org/hg/dap/raw-file/tip/network-api/Overview.html

On Fri, Dec 9, 2016 at 12:43 PM Michael A. Peters <mpeters@domblogger.net>
wrote:

> On 12/09/2016 09:03 AM, Boris Zbarsky wrote:
> > On 12/9/16 5:57 AM, Michael A. Peters wrote:
> >> max-height and max-width and orientation change, but device-width does
> >> not change.
> >
> > Just as a point of fact, device-width can absolutely change.  The
> > simplest case is a two-monitor setup with the window getting dragged
> > from one monitor to another, but similar things can happen when things
> > are docked/undocked, monitors are plugged in or removed, etc.
> >
> > -Boris
>
> Ah yes, point taken.
>
> With a bandwidth query I would recommend it only change on a page reload
> but it wouldn't have to be done that way.
>
> This wouldn't only be beneficial to fonts, a lot of images etc. are
> defined in CSS too.
>
Received on Friday, 9 December 2016 19:52:01 UTC

This archive was generated by hypermail 2.3.1 : Friday, 9 December 2016 19:52:01 UTC