Closed Bug 1597639 Opened 4 years ago Closed 4 years ago

[css-grid] grid-template shouldn't accept `"string" [foo] [bar]` as valid syntax

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: Oriol, Assigned: MatsPalmgren_bugz)

References

Details

(Keywords: testcase)

Attachments

(1 file)

From https://drafts.csswg.org/css-grid/#propdef-grid-template, the syntax for grid-template is

none |
[ <'grid-template-rows'> / <'grid-template-columns'> ] |
[ <line-names>? <string> <track-size>? <line-names>? ]+ [ / <explicit-track-list> ]?

Therefore "string" [foo] [bar] should be invalid. But Firefox accepts it as valid (it's treated as "string" [foo bar]).

Testcase: CSS.supports('grid-template', '"string" [foo] [bar]'), expected false, got true.

Oriol, are you adding a WPT for this or should I do it?

Assignee: nobody → mats
Flags: needinfo?(oriol-bugzilla)

No I haven't written a WPT for this, you can add it in your patch

Flags: needinfo?(oriol-bugzilla)

No problem, I'll add one under css/css-grid/parsing/.

Priority: -- → P3

(While writing tests for this I found that we can use shorter serialized forms in some cases. Filed bug 1597884 for that.)

OS: Unspecified → All
Hardware: Unspecified → All
Pushed by mpalmgren@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/afdcb1d12854
[css-grid] Don't accept two trailing <line-names> in the grid/grid-template shorthands.  r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/20419 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: