When dealing with grid columns that have a width of auto or a min-auto width defined within minmax(), such as minmax(auto, 1fr), it would be beneficial to have an option for collapsing gaps.
Proposed Feature:
Collapsing gaps should function similarly to collapsing margins, where adjacent gaps with an empty column in between would collapse into a single gap.
Example Scenario:
Consider the following example: CodePen Example
In this example, an image is optional. When the image is missing, the current behavior results in a 4rem gap instead of the desired 2rem gap. Collapsing gaps would address this issue, ensuring the layout remains consistent and visually appealing even when certain elements are not present.