W3C home > Mailing lists > Public > public-respimg@w3.org > August 2012

Re: Initial comments on picture proposal

From: Andy Davies <dajdavies@gmail.com>
Date: Thu, 30 Aug 2012 11:48:05 +0100
Message-ID: <CABbusAL4XRJt43+-ZR-C618yVh0TLaq6qZG3JKJ4a3mPoeR6Rw@mail.gmail.com>
To: Anselm Hannemann <info@anselm-hannemann.com>
Cc: public-respimg@w3.org
On 30 August 2012 08:46, Anselm Hannemann <info@anselm-hannemann.com> wrote:
> Am Mittwoch, 29. August 2012 um 23:47 schrieb Andy Davies:
>
> 3.1 Picture element permitted attributes & 3.2 Source element
>
> Type makes sense as an attribute when src is specified but it's
> unclear how it fits when a srcset is specified with different image
> types and/or a fallback colour
>
> Type should only be set per source so it's always the right type for the
> specific image.
> If you use srcset you might not be able to set type.
> But type attribute is not required, it's optional for future image formats
> and browser support.
> You might be able to set one type for src-set which is applied to all
> sources specified in your srcset then.
> This requires you to set every source the same type.
>
> 4. Algorithms
>
> If src and srcset are both specified on the picture or source element
> it's unclear which will be used (or is it assumed that src is the 1x
> image?)
>
> src is only thought as fallback. AFAIK is @1x is standard and you have to
> specify @2x etc additionally. This has been in
> discussion at WHATWG and I am not sure what exactly was the solution. They
> wanted to have @2x as default size.
>

Having thought a bit about it overnight I wonder if we only need
srcset rather than both src and srcset.

If srcset follows the image-set grammar then it seems src isn't
required as both the following are valid:

    srcset="image.jpg"

    srcset="image.jpg 1x, image-x2.jpg 2x, #000"

(of course this assumes I've read the CSS4 images spec correctly)

Cheers

Andy
Received on Thursday, 30 August 2012 10:48:32 UTC

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