[whatwg] <imgset> responsive imgs proposition (Re: The src-N proposal)

Yoav Weiss yoav at yoav.ws
Fri Nov 15 09:00:16 PST 2013


On Fri, Nov 15, 2013 at 4:20 PM, Adam Barth <w3c at adambarth.com> wrote:

>
> My apologies.  I thought Christian Biesinger addressed all these
> concerns with his proposal:
>
> On Tue, Nov 12, 2013 at 5:56 PM, Christian Biesinger
> <cbiesinger at google.com> wrote:
> > For a bit more presentation, and while we're inventing new syntax
> > anyway, how about this:
> >
> > <style>
> > @media (min-width: 480px) {
> >   .artdirected { content: replaced url(attr(src-small)); }
> > }
> > @media (min-width: 600px) {
> >   .artdirected { content: replaced url(attr(src-medium)); }
> > }
> > @media (min-width: 800px) {
> >   .artdirected { content: replaced url(attr(src-big)); }
> > }
> > </style>
> > ...
> > <img class="artdirected" src="foo.jpg" src-small="foo-small.jpg"
> > src-medium="foo-medium.jpg" src-big="foo-big.jpg">
>
> Specifically, his approach uses an <img> element, which addresses all
> four of Maciej's concerns.
>

You're right, Maciej's concerns were addressed by Christian's proposal (and
John's followup proposal).

Any thoughts on my concerns with making inline CSS mandatory (especially
from the CSP angle)?



More information about the whatwg mailing list