W3C home > Mailing lists > Public > public-respimg@w3.org > October 2014

Re: Element Query and Selector Media Query Types

From: Simon Pieters <simonp@opera.com>
Date: Mon, 27 Oct 2014 07:47:51 +0200
Cc: "public-respimg@w3.org" <public-respimg@w3.org>
To: "Ben Callahan" <ben@heysparkbox.com>, Attiks <attiks@gmail.com>
Message-ID: <op.xoc20yxbidj3kv@simons-mbp>
On Mon, 20 Oct 2014 22:24:35 +0100, Attiks <attiks@gmail.com> wrote:

> The current problem with picture using sizes and srcset is that it does  
> not
> work well on wide screens when using a mobile first approach, for our  
> site
> - in the widest layout - the image could be between 250px and 530px, to
> support all high dpi screens we added images with widths up to 2500px.  
> The
> max-width of the 'page' is set to 1060px, the sizes attribute is  
> (min-width:
> 30em) 40%, 50%

(I assume you mean vw, not %.)

It seems to me that you are missing a value in your sizes for the 1060px  
breakpoint. It's not clear to me how your layout works, but maybe you want  
something like this:

sizes="(min-width: 1060px) 424px, (min-width: 30em) 40vw, 50vw"

(40% of 1060px is 424px.)

Simon Pieters
Opera Software
Received on Monday, 27 October 2014 14:48:21 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:06:15 UTC