[css-grid] gap should autoprefix to grid-gap

Author: Dan503Created Dec 26, 2019Updated Jun 17, 2021

In reference to this comment in the tailwind grid support pull request: https://github.com/tailwindcss/tailwindcss/pull/1274#issuecomment-568920481

I think autoprefixer should translate gap to grid-gap.

Note that this should happen even if the grid prefixing setting is set to false since this is not an IE Grid compatibility issue. It is a modern CSS Grid issue.

Input CSS:

.gap-20 {
  gap: 20px;
}

Expected output:

.gap-20 {
  grid-gap: 20px;
  gap: 20px;
}

Current output:

.gap-20 {
  gap: 20px;
}

grid-gap is essentially just a prefixed version of gap now, so I'm not sure why Autoprefixer wouldn't support it.