W3C home > Mailing lists > Public > www-style@w3.org > August 2012

Re: [css4-images] Comments on cross-fade

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 30 Aug 2012 07:58:31 -0700
Message-ID: <CAAWBYDA_s3bkGjW8uq51YrCJmZtT9b4M19nf-GkZPw2kNCAXpQ@mail.gmail.com>
To: Lea Verou <lea@w3.org>
Cc: www-style list <www-style@w3.org>
On Thu, Aug 30, 2012 at 4:58 AM, Lea Verou <lea@w3.org> wrote:
> - I think it would make sense to make the <percentage> in cross-fade() [1]
> optional, with a default value of 50%. Otherwise, I anticipate it will break
> many author expectations.

Interesting.  I didn't consider that.  If we made it optional at all,
defaulting it to 50% definitely makes the most sense.  Sure.

> - Why not allow any order? There doesn’t seem to be a disambiguation reason
> to mandate that the percentage goes first, but I might be missing something.

There is!  The intuitive meaning of the percentage changes depending
on whether it's the first or last argument, as it feels like it's
specifying the percentage of the nearest image that is retained.  That
is, "cross-fade(20% A, B) and "cross-fade(A, B 20%)" don't feel, to me
at least, like they're specifying the same image.  (I'm not sure which
behavior people would expect if the percentage was in the middle.)

> - Not sure about this, but why not allow multiple arguments? Sure, one can
> nest multiple cross-fade() calls, but it starts looking like Lisp :-) Not
> sure how frequently that is needed, but it doesn’t seem much extra effort
> for editors or implementors, so why not?

I know how a >2 cross-fade would be specced and rendered, but the
problem is that I'm not really sure how to animate it.

I also can't think of a good reason for it - the only reason I can
think of to fade between three images is if you interrupted a fade
between two of them, and are now fading to a third instead.  You
*must* use nested cross-fade()s in this case, though - if you try to
just tack the new one onto the end, it'll animate wrong.

So, I'm not sure there's value right now in adding a multi-arg
version.  We can always add it in the future.

~TJ
Received on Thursday, 30 August 2012 14:59:27 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:59 GMT