Re: [css-variables] Remaining Issues



On 6/11/13 10:46 AM, "François REMY" <francois.remy.dev@outlook.com> wrote:

>> What does the 'possibility of replacing normal properties' mean? And why
>> is it very important?
>
>A property replace another if, instead of changing that second property,
>you change the other to achieve a similar effect.
>
>Example:
>
>   var-col-size: 33%;
>   var-col-index: 1;
>   position: absolute;
>   left: get(var-col-index * var-col-size);
>
>If I want to animate my layout, and add a fourth column inside an
>animation, or change an element of column inside an animation, I may want
>to transition 'var-col-index' from 1 to 2, or change the 'var-col-size'
>property in order to create an anim where the colsize increases from 0 to
>33% at the opening of the page.

I don't see any 'replacement'; you're animating the left value in a way
similar to what happens today when percentage values recompute as the
width/height of a containing block is animated.

>
>If custom properties are not animatable, I think I'll consider them
>'completely broken', down from my current 'they are broken' vision.

Intransigeant assertions are not very useful. Describing the kind of
use-cases that would be 'completely broken' adds much more value. The one
you propose above seems unnecessarily contrived, fwiw.  Animating the
addition of this column implies animating the width of the container,
which works today. You could then position your element using the right
property; this would be a lot simpler and require no calculation using
column index or column size.           

Received on Tuesday, 11 June 2013 09:00:15 UTC