Closed Bug 1248371 Opened 4 years ago Closed 4 years ago

[css-grid] <auto-track-list> requires that each track has a definite min- or max-sizing function

Categories

(Core :: CSS Parsing and Computation, defect, minor)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: svillar, Assigned: mats)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/602.1 (KHTML, like Gecko) Version/8.0 Safari/602.1 Debian/buildd-unstable (3.18.3-1) Epiphany/3.18.3

Steps to reproduce:

<auto-track-list> is defined in the specs as 

[ <line-names>? [ <fixed-size> | <fixed-repeat> ] ]+ <auto-repeat>
                     [ <line-names>? [ <fixed-size> | <fixed-repeat> ] ]+ <line-names>?

meaning that definite minimum track sizes are required not only for <auto-repeat> but for the whole <auto-track-list> declaration.




Actual results:

Currently a declaration like this:

grid-template-columns: repeat(auto-fill, 10px) auto; 

is considered valid in Firefox.


Expected results:

grid-template-columns: repeat(auto-fill, 10px) auto; is an invalid declaration according to specs (Blink&WebKit behave like that).
Component: Untriaged → CSS Parsing and Computation
Product: Firefox → Core
Thanks for the report!

Note that the spec has changed since you reported this.
<fixed-size> now only requires that *either* the min- or max-sizing function is fixed:

<fixed-size>       = <fixed-breadth> |
                     minmax( <fixed-breadth> , <track-breadth> ) |
                     minmax( <track-breadth> , <fixed-breadth> )

https://drafts.csswg.org/css-grid/#typedef-fixed-size
Assignee: nobody → mats
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: [css-grid] <auto-track-list> requires definite minimum track sizes → [css-grid] <auto-track-list> requires that each track has a definite min- or max-sizing function
Blocks: 1118820
Severity: normal → minor
Flags: in-testsuite+
OS: Unspecified → All
Hardware: Unspecified → All
Comment on attachment 8730051 [details] [diff] [review]
fix+tests

Review of attachment 8730051 [details] [diff] [review]:
-----------------------------------------------------------------

r=me, just one nit:

::: layout/style/nsCSSParser.cpp
@@ +8692,5 @@
>            REPORT_UNEXPECTED(PEMoreThanOneGridRepeatAutoFillFitInTrackList);
>            return false;
>          }
>          haveRepeatAuto = true;
> +        // Require that all track sizes so far are <fixed-size>.

Please add another line before this comment, saying e.g.
 // Looks like we're parsing an <auto-track-list>.

With that context, the next comment (the one you've already got here) makes more sense).
Attachment #8730051 - Flags: review?(dholbert) → review+
https://hg.mozilla.org/mozilla-central/rev/ed56694589be
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.