Skip to content

Grid with inputs has incorrect gap on mobile devices #452

@ekerstein

Description

@ekerstein

Describe the issue

Current Behavior

When a grid with inputs is viewed on a mobile device, the vertical spacing appears too wide and does not match with the same display of the non-grid version of the inputs.

Expected Behavior

Whether inputs are in a grid or not should not affect their vertical spacing on mobile devices.

Reproduction URL

Images

Inputs inside of grid
grid inputs

Inputs not inside of grid
non-grid inputs

Grid gap for inputs on mobile
grid input gap

Potential solution

The issue appears to be that grid-row-gap is applied on mobile widths to grids. Here's a potential solution that is working for me when I test it:

.grid {
    grid-row-gap: 0;
}
@media (min-width: 768px) {
    .grid {
        grid-row-gap: var(--pico-grid-row-gap);
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions