Skip to content

Enabling src on source? #78

Closed
Closed

Description

@yoavweiss

Should we add the possibility of adding an src attribute to the <source> element?
It can be useful as a shortcut if only art-direction is needed, or if CH is used to do res switching. (with the RW hint).

Alternatively, we can ignore it, since a single URL with no descriptors is perfectly legal with srcset.

Activity

  1. nwtn commented on Jan 2, 2014

    @nwtn

    I like the idea of having src.

    I'm making this argument, but I don't actually believe it: I could see not having src causing author confusion, since it's a pattern they're used to using with video/source.

  2. Wilto commented on Jan 2, 2014

    @Wilto
    Member

    I like the idea of having src available (though we should keep no-descriptor srcset in play), but if it stands to complicate implementation any I could certainly live without it. Like @nwtn said: it will definitely be expected to work.

  3. yoavweiss commented on Jan 2, 2014

    @yoavweiss
    MemberAuthor

    I'm actually torn on this one. On the one hand, I agree that devs will expect it to be there. On the other hand, why didn't we define srcset to be src? (Mainly because devs would expect src to behave like src)

    Having 2 attributes won't complicate implementation much, but will uglify the spec & algorithms. Beyond dev expectations, there's no real need for 2 distinct attributes, so I don't know what's the best approach.

  4. uniqname commented on Jan 2, 2014

    @uniqname
    Member

    Since a valid src value is also a valid srcset value, one could make the
    argument that src is only needed for legacy purposes. Since is anew element altogether it doesn't need that kind of legacy support. src isthen redundant no? Plus, it would dive home a little more that within a is not the same as within or

    On Thu, Jan 2, 2014 at 3:24 PM, Yoav Weiss notifications@github.com wrote:

    I'm actually torn on this one. On the one hand, I agree that devs will
    expect it to be there. On the other hand, why didn't we define srcset to
    be src? (Mainly because devs would expect src to behave like src)

    Having 2 attributes won't complicate implementation much, but will uglify
    the spec & algorithms. Beyond dev expectations, there's no real need for 2
    distinct attributes, so I don't know what's the best approach.

    —
    Reply to this email directly or view it on GitHubhttps://github.com//issues/78#issuecomment-31490283
    .

    Cory Brown

  5. yoavweiss commented on Jan 2, 2014

    @yoavweiss
    MemberAuthor

    Since no one seems to have a very strong opinion that src must be supported, we're probably better off leaving it out for now. Closing, but feel free to re-open if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions