Skip to content
This repository was archived by the owner on Feb 20, 2026. It is now read-only.
This repository was archived by the owner on Feb 20, 2026. It is now read-only.

Can/should we add a stylelint rule, forcing grid children to set a min-width #209

@peeke

Description

@peeke

Is it possible to add a stylelint rule, that forces grid children to define min-width?

By default, a grid item cannot be smaller than the size of its content, since grid items have an initial size of min-width: auto and min-height: auto.

This can (and will, at some point) lead to grid blowouts. Setting the min-width: 0 effectively resets this minimum size to a less problematic value. The issue can also be fixed by using minmax(0, 1fr) instead of 1fr in your column definitions, but this would in my eyes be less develoepr friendly.

https://css-tricks.com/preventing-a-grid-blowout/

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions