Re: CSS Transitions Feedback

On Wed, Jan 14, 2009 at 7:43 AM, Anne van Kesteren <annevk@opera.com> wrote:
>
> On Wed, 14 Jan 2009 14:36:22 +0100, Lachlan Hunt <lachlan.hunt@lachy.id.au>
> wrote:
>>
>> You seem to have missed answering this question.
>>
>> To clarify the issue, consider this example:
>>
>> transition-property: border-width, color;
>> transition-duration: 1s, 2s, 3s, 4s, 5s;
>>
>> The issue is whether the first duration specified applies to all four
>> border-*-width properties, or whether the first four durations specified are
>> applied to each of them in a given order.  In the first alternative, color
>> would have a duration of 2s and the last three durations would be
>> effectively ignored; in the second it would have a duration of 5s, with the
>> first 4 applying to the border widths.
>>
>> I spoke with Rune and he said the first alternative would be the most
>> sensible, in which case, the following 2 examples would be equivalent:
>>
>> 1)
>> transition-property: border-width, color;
>> transition-duration: 1s, 2s;
>>
>> 2)
>> transition-property: border-top-width, border-right-width,
>> border-bottom-width, border-left-width, color;
>> transition-duration: 1s, 1s, 1s, 1s, 2s;
>
> I think we pretty much have to do it this way otherwise it creates problems
> down the line if we extend the border-width shorthand to be a shorthand for
> more properties.

Agreed.  It would become a general problem for *any* property,
actually, that may be turned into a shorthand for more specific
properties later (frex, overflow becoming shorthand for overflow-x and
overflow-y).

Plus, it just makes more intuitive sense.  One entry in the duration
list maps to one entry in the property list.  Having to recall the
arity of each property is just asking for hard-to-spot bugs in your
CSS.

~TJ

Received on Wednesday, 14 January 2009 14:29:59 UTC