stitchesjs / stitches

[Not Actively Maintained] CSS-in-JS with near-zero runtime, SSR, multi-variant support, and a best-in-class developer experience.
https://stitches.dev
MIT License
7.72k stars 251 forks source link

In a grid layout, gap configured in breakpoints won't work #1126

Open bitweedx86 opened 1 year ago

bitweedx86 commented 1 year ago

Bug report

Describe the bug

When writing a stitches object, the grid column/row object won't apply on the element.

To Reproduce

The object looks like this:

const TablesGrid = styled('div', {
  display: 'grid',

  variants: {
    gap: {
      horizontal: {
        gap: 4,
        gridTemplateColumns: '1fr 1fr',
      },
      vertical: {
        gap: 16,
        gridTemplateColumns: '1fr',
      },
    },
  },
});

Expected behavior

Expected that the gap will be applied based on different breakpoint.

Screenshots

CleanShot 2022-12-04 at 12 48 38@2x

CleanShot 2022-12-04 at 12 48 31@2x

System information

bitweedx86 commented 1 year ago
CleanShot 2022-12-04 at 12 50 54@2x

This is the setup of the breakpoints.

And it did work if I setup like this:

CleanShot 2022-12-04 at 12 50 49@2x