style: Implement Animate for track lists on grid-template-{columns|rows}.

Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1348519#c6 and
https://github.com/w3c/csswg-drafts/issues/3201:

Currently grid-template-rows/columns interpolate “per computed value”, which
means that if the number of tracks differs, or any track changes to/from a
particular keyword value to any other value, or if a line name is added/removed
at any position, the entire track listing is interpolated as “discrete”.
But we "agree" with two more granular options:

1. Check interpolation type per track, rather than for the entire list, before
   falling back to discrete. I.e. a length-percentage track can animate between
   two values while an adjacent auto track flips discretely to min-content.
2. Allow discrete interpolation of line name changes independently of track
   sizes.

Besides, for the repeat() function, it's complicated to support interpolation
between different repeat types (i.e. auto-fill, auto-fit) and different repeat
counts, so we always fall-back to discrete if the first parameter of repeat()
is different.

Differential Revision: https://phabricator.services.mozilla.com/D16129
This commit is contained in:
Boris Chiou 2019-01-12 02:22:39 +00:00 committed by Emilio Cobos Álvarez
parent a8943d2ec5
commit 2b77a29697
4 changed files with 191 additions and 7 deletions

View file

@ -383,7 +383,7 @@ ${helpers.predefined_type(
spec="https://drafts.csswg.org/css-grid/#propdef-grid-template-%ss" % kind,
boxed=True,
flags="GETCS_NEEDS_LAYOUT_FLUSH",
animation_value_type="discrete",
animation_value_type="ComputedValue",
)}
% endfor