postcss / autoprefixer

Parse CSS and add vendor prefixes to rules by Can I Use
https://twitter.com/autoprefixer
MIT License
21.58k stars 1.25k forks source link

unexpected NaN when autoplacing grid for IE #1446

Closed SukkaW closed 2 years ago

SukkaW commented 2 years ago

Given the code:

.test{grid-row-start:span 3; grid-row-end: 5}

autoprefixer (online demo) outputs:

/*
* Prefixed by https://autoprefixer.github.io
* PostCSS: v8.3.6,
* Autoprefixer: v10.3.1
* Browsers: since 2005
*/
.test{-ms-grid-row:span 3;grid-row-start:span 3; -ms-grid-row-span: NaN; grid-row-end: 5}

It can also be reproduced in the latest version:

const autoprefixer = require('autoprefixer')
const postcss = require('postcss')

const css = `
/* autoprefixer grid: autoplace */
.test{grid-row-start:span 3; grid-row-end: 5}
`;

postcss([ autoprefixer ]).process(css).then(result => {
  result.warnings().forEach(warn => {
    console.warn(warn.toString())
  })
  console.log(result.css)
});

https://runkit.com/sukkaw/postcss-issue-1446

ai commented 2 years ago

Since IE 11 is old browser, I will not have time to fix it.

But I will accept PR and will help.