Fall back to an older version of the spec in TrackRepeat for the parity with gecko

This commit is contained in:
Nazım Can Altınova 2017-07-03 11:35:19 -07:00
parent 5eb33bac8f
commit f4eccdae3f

View file

@ -143,6 +143,16 @@ impl TrackRepeat<LengthOrPercentage> {
values.push(track_size);
names.push(current_names);
if is_auto {
// FIXME: In the older version of the spec
// (https://www.w3.org/TR/2015/WD-css-grid-1-20150917/#typedef-auto-repeat),
// if the repeat type is `<auto-repeat>` we shouldn't try to parse more than
// one `TrackSize`. But in current version of the spec, this is deprecated
// but we are adding this for gecko parity. We should remove this when
// gecko implements new spec.
names.push(input.try(parse_line_names).unwrap_or(vec![]));
break
}
} else {
if values.is_empty() {
// expecting at least one <track-size>