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

2013-11-15 Thread Bruno Racineux
>> It does not require the preloader to have full css parser. It only has >>to >> parse @media and the new @imgset CSS subset language, using a similar >> syntax to @media. And I believe if offer an easy way to polyfill this. > >This isn't as terrible for polyfilling, since it's easier to spot >th

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

2013-11-15 Thread Bruno Racineux
On 11/15/13 3:23 PM, "Tab Atkins Jr." wrote: >I don't understand. You don't "repeat" any sources, you specify them >once. There's just a batch of sources per image. Can't make this >more compact. What I mean is that with src-N you will have to repeat the paths AND the full batch for every im

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

2013-11-15 Thread Tab Atkins Jr.
[whatever mail program you're using is doing quoting terribly, so I have to correct it afterwards] On Fri, Nov 15, 2013 at 3:42 PM, Timothy Hatcher wrote: > On Nov 15, 2013, at 3:23 PM, Tab Atkins Jr. wrote: >> Not really. PreloaderCSS gives you two choices, both bad: >> >> 1. Put the image sou

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

2013-11-15 Thread Timothy Hatcher
On Nov 15, 2013, at 3:23 PM, Tab Atkins Jr. wrote: >>> The simplest one isn't much worse, granted. It suffers from the "put >>> an id on it" that makes working with / a minor chore, >>> but otherwise is mostly just shifting things around. >> >> Sure you can use ids. But the idea behind the CSS

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

2013-11-15 Thread Tab Atkins Jr.
On Fri, Nov 15, 2013 at 3:02 PM, Bruno Racineux wrote: > On 11/15/13 1:28 PM, "Tab Atkins Jr." wrote: >>Why would you be using classes? Most images that you need to make >>responsive are one-off content images, like the big picture in >> (and mayb

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

2013-11-15 Thread Bruno Racineux
On 11/15/13 2:50 PM, "Tab Atkins Jr." wrote: >There is no compaction >scheme that helps here. (Unless you're trying for one of the >url-template ones, and we don't want to go there.) Why not? I'd like to hear the argument against what I am proposing. Either a regex or a template approach. You

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

2013-11-15 Thread Bruno Racineux
On 11/13/13 5:52 AM, "John Mellor" wrote: > >@media (max-width: 19.99em) { >.artdirected { content: replaced image-set(128px; >attr(srcs-smallicon)); >} >} >@media (min-width: 20em) { >.artdirected { content: replaced image-set(100% (30em) 50% (50em) 33%; >attr(srcs-flexwidth)); } >} You

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

2013-11-15 Thread Tab Atkins Jr.
On Fri, Nov 15, 2013 at 12:39 PM, Adam Barth wrote: > Do you have an alternative proposal aside from src-N? Recall that > src-N has been rejected by WebKit and therefore is no longer viable. Hey, WebKit, what's your answer if we just take src-N and use a || separator to cram them all into a sing

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

2013-11-15 Thread Tab Atkins Jr.
On Fri, Nov 15, 2013 at 2:39 PM, Timothy Hatcher wrote: > On Nov 15, 2013, at 1:28 PM, Tab Atkins Jr. wrote: >> You can s/src-1/srcset/ this example; the two are identical for this >> use-case. > > I was saying srcset would naturally better here instead of in a > world where src-N does not exist

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

2013-11-15 Thread Tab Atkins Jr.
On Fri, Nov 15, 2013 at 2:49 PM, Bjoern Hoehrmann wrote: > * Tab Atkins Jr. wrote: >>On Fri, Nov 15, 2013 at 2:39 PM, Ian Hickson wrote: >>> On Fri, 15 Nov 2013, Tab Atkins Jr. wrote: These examples... do not look good. >>> >>> I presume you mean that they don't look good in the

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

2013-11-15 Thread Bjoern Hoehrmann
* Tab Atkins Jr. wrote: >On Fri, Nov 15, 2013 at 2:39 PM, Ian Hickson wrote: >> On Fri, 15 Nov 2013, Tab Atkins Jr. wrote: >>> These examples... do not look good. >> >> I presume you mean that they don't look good in the

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

2013-11-15 Thread Tab Atkins Jr.
On Fri, Nov 15, 2013 at 2:39 PM, Ian Hickson wrote: > On Fri, 15 Nov 2013, Tab Atkins Jr. wrote: >> These examples... do not look good. > > I presume you mean that they don't look good in the

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

2013-11-15 Thread Timothy Hatcher
On Nov 15, 2013, at 1:28 PM, Tab Atkins Jr. wrote: > On Fri, Nov 15, 2013 at 1:05 PM, Timothy Hatcher wrote: >> On Nov 15, 2013, at 12:30 PM, Tab Atkins Jr. wrote: >>> Use-case 1: Variable density. >>> >>> src-N >>> >>> >>> PreloaderCSS >>> >>> >>> #foo { content: replaced image-set("foo.5

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

2013-11-15 Thread Ian Hickson
On Fri, 15 Nov 2013, Tab Atkins Jr. wrote: > > These examples... do not look good. I presume you mean that they don't look good in the

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

2013-11-15 Thread Tab Atkins Jr.
On Fri, Nov 15, 2013 at 1:05 PM, Timothy Hatcher wrote: > On Nov 15, 2013, at 12:30 PM, Tab Atkins Jr. wrote: >> Use-case 1: Variable density. >> >> src-N >> >> >> PreloaderCSS >> >> >> #foo { content: replaced image-set("foo.5" .5x, "foo1" 1x, "foo2" 2x, >> "foo3 3x"); } >> > > The simple ca

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

2013-11-15 Thread Tab Atkins Jr.
On Fri, Nov 15, 2013 at 12:39 PM, Adam Barth wrote: > Do you have an alternative proposal aside from src-N? Recall that > src-N has been rejected by WebKit and therefore is no longer viable. As far as I've been able to divine, Apple's position is "do nothing, because srcset is good enough for th

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

2013-11-15 Thread Timothy Hatcher
On Nov 15, 2013, at 12:30 PM, Tab Atkins Jr. wrote: > Use-case 1: Variable density. > > src-N > > > PreloaderCSS > > > #foo { content: replaced image-set("foo.5" .5x, "foo1" 1x, "foo2" 2x, > "foo3 3x"); } > The simple case is a case srcset (the DPR parts) solves and I'd argue should be u

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

2013-11-15 Thread Adam Barth
On Fri, Nov 15, 2013 at 12:30 PM, Tab Atkins Jr. wrote: > On Tue, Nov 12, 2013 at 10:40 AM, Tab Atkins Jr. wrote: >> On Tue, Nov 12, 2013 at 9:50 AM, Adam Barth wrote: >>> We might even be able to make this work without inventing anything: >>> >>> >>> @media (min-width: 480px) { >>> .artdirec

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

2013-11-15 Thread Tab Atkins Jr.
On Tue, Nov 12, 2013 at 10:40 AM, Tab Atkins Jr. wrote: > On Tue, Nov 12, 2013 at 9:50 AM, Adam Barth wrote: >> We might even be able to make this work without inventing anything: >> >> >> @media (min-width: 480px) { >> .artdirected { >> width: 30px; >> height: 30px; >> background-

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

2013-11-15 Thread Adam Barth
On Fri, Nov 15, 2013 at 10:32 AM, Tim Kadlec wrote: > To my knowledge the only implementor who flat-out refused to implement src-N > was WebKit. > > There is interest from Mozilla and Blink, though it did sound like Blink was > considering playing follow the leader. That's right. Blink isn't lik

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

2013-11-15 Thread Tim Kadlec
To my knowledge the only implementor who flat-out refused to implement src-N was WebKit. There is interest from Mozilla and Blink, though it did sound like Blink was considering playing follow the leader. Take care, Tim Kadlec On Fri, Nov 15, 2013 at 12:25 PM, Adam Barth wrote: > On Fri, Nov

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

2013-11-15 Thread Adam Barth
On Fri, Nov 15, 2013 at 10:25 AM, matmarquis.com wrote: > On Nov 15, at 12:27 PM, Yoav Weiss wrote: Any thoughts on my concerns with making inline CSS mandatory (especially from the CSP angle)? >>> >>> CSP 1.1 supports securing inline style and script with nonces and/or >>> hashes. >> >>

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

2013-11-15 Thread matmarquis.com
On Nov 15, at 12:27 PM, Yoav Weiss wrote: >>> >>> Any thoughts on my concerns with making inline CSS mandatory (especially >>> from the CSP angle)? >> >> CSP 1.1 supports securing inline style and script with nonces and/or >> hashes. >> >> > OK, since the latest proposals keep the URLs outsid

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

2013-11-15 Thread Yoav Weiss
> > > > Any thoughts on my concerns with making inline CSS mandatory (especially > > from the CSP angle)? > > CSP 1.1 supports securing inline style and script with nonces and/or > hashes. > > OK, since the latest proposals keep the URLs outside the style, modifying the content image can keep the s

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

2013-11-15 Thread matmarquis.com
On Nov 15, at 12:12 PM, Shane Hudson wrote: > Could I just please clarify, since its been hard to follow the > conversation, that having the style internal means that the prefetcher can > still handle the images properly? Also, we seem to be operating under the assumption that requiring in-page C

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

2013-11-15 Thread John Mellor
On Fri, Nov 15, 2013 at 5:12 PM, Shane Hudson wrote: > Could I just please clarify, since its been hard to follow the > conversation, that having the style internal means that the prefetcher can > still handle the images properly? > Yes, *but* only if you use a limited subset of CSS. Adam sugges

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

2013-11-15 Thread Shane Hudson
Could I just please clarify, since its been hard to follow the conversation, that having the style internal means that the prefetcher can still handle the images properly? Thanks, Shane On Fri, Nov 15, 2013 at 4:20 PM, Adam Barth wrote: > On Fri, Nov 15, 2013 at 1:55 AM, Yoav Weiss wrote: > >>

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

2013-11-15 Thread Adam Barth
On Fri, Nov 15, 2013 at 9:00 AM, Yoav Weiss wrote: > On Fri, Nov 15, 2013 at 4:20 PM, Adam Barth 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 >> wrote: >> > For a bit more pres

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

2013-11-15 Thread Yoav Weiss
On Fri, Nov 15, 2013 at 4:20 PM, Adam Barth 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 > wrote: > > For a bit more presentation, and while we're inventing new syntax > > anyway

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

2013-11-15 Thread Adam Barth
On Fri, Nov 15, 2013 at 1:55 AM, Yoav Weiss wrote: >> On Tue, Nov 12, 2013 at 7:31 PM, Maciej Stachowiak wrote: >>> Content authors can already do what is described above, and in fact often >>> do. However, a with a background-image property set is not the same as >>> an in practice. Here are a

Re: [whatwg] Questions regarding Path object

2013-11-15 Thread Tobias R.
On Wed, Nov 6, 2013 at 12:41 PM, Jürg Lehni wrote: > On Nov 4, 2013, at 13:32 , Anne van Kesteren wrote: > >> Objects not having constructors is a bad API practice we are moving away >> from. > > I'm not sure everybody thinks so. There are whole libraries out there that > avoid the use of 'new'

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

2013-11-15 Thread Yoav Weiss
> > > > On Tue, Nov 12, 2013 at 7:31 PM, Maciej Stachowiak wrote: > >> >> Content authors can already do what is described above, and in fact often >> do. However, a with a background-image property set is not the same >> as an in practice. Here are a few differences: >> >> (1) There's no ready