Skip to content

[css-grid] Should calc(1fr) be invalid? #6989

Closed
@LeaVerou

Description

@LeaVerou

Testcase: https://codepen.io/leaverou/pen/dyZPoRz

Right now, all browsers seem to be treating any fr in calc() as invalid, even calc(1fr), which is unfortunate, since using calc() to calculate the ratio between grid columns is quite useful. E.g. my use case went something like:

grid-template-columns: calc(1fr * var(--divider-ratio, .5)) calc(1fr * (1 - var(--divider-ratio, .5)));

Is this per spec, or is it just a misunderstanding of this note by implementors?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Closed as Question AnsweredUsed when the issue is more of a question than a problem, and it's been answered.css-grid-1css-grid-2Subgrid; Current Workcss-grid-3Masonry Layout

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions