[whatwg] The <pic> element
kornel at geekhood.net
Mon Jun 4 00:41:04 PDT 2012
On Mon, 04 Jun 2012 00:56:55 -0500, Anselm Hannemann Web Development
<info at anselm-hannemann.com> wrote:
>>>> <pic src-xs="small.jpg" media-xs="(max-width:15em)"
>>>> src-xl="large.jpg" alt="alt text" title="title text"></pic>
>>> I don't mind either way, but this seems a bit more noisier and less
>>> <source> can be an option for authors who prefer separate attributes.
>> I’m still digesting the overall proposal, but regarding the media-*
>> and src-* attributes, my main concern would be limiting ourselves by
>> prescribing a set number of sizes (e.g. "small," "medium," and
>> "large") when in reality there may be more nuance in art direction
>> than that. might accommodate.
> That is only partially true because this is just a proposal by me which
> can easily be changed to another not limiting syntax…
> But nevertheless you might not have more than 9 different file-sizes,
> right? This is what is covered by mine (xxxs, xxs, xs, s, m, l, xl, xxl,
I initially presumed that any name could be used, similarly to data-*,
e.g. src-foobar="" media-foobar="". However, that doesn't imply any
ordering (attributes don't have order by definition), and that complicates
source selection algorithm.
In that case I think the syntax with separated attributes is less clear
than a microsyntax in a single attribute — list in a single attribute has
obvious ordering and doesn't rely on an ordered set of predefined names.
regards, Kornel Lesiński
More information about the whatwg