Skip to content

fr units not accepted in grid-template-columns property #2598

@stefan-cotitosu

Description

@stefan-cotitosu

Description

The code with fr units is not validated unless the unit is wrapped in parentheses which makes the code invalid.

Step-by-step reproduction instructions

  1. Use the Block CSS editor
  2. Add the following property:
    grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr));

It throws this error:
Expected RBRACE at line 2, col 67.

The code validates in the editor if it's written as follows, which is not correct.
grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), (1fr)));

Screenshots, screen recording, code snippet or Help Scout ticket

Reported here: https://wordpress.org/support/topic/issue-with-grid-template-columns/

Environment info

No response

Is the issue you are reporting a regression

No

Metadata

Metadata

Assignees

Labels

bugThis label could be used to identify issues that are caused by a defect in the product.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions