Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autoprefixer fails on combination of @supports and grid-template-columns #1244

Closed
smashercosmo opened this issue Sep 10, 2019 · 8 comments · May be fixed by noprotocol/gulp-noprotocol#9 or neo355/css#8
Closed
Labels
bug

Comments

@smashercosmo
Copy link

@smashercosmo smashercosmo commented Sep 10, 2019

The following snippet

@supports (grid-template-columns: 1fr) {
  .columns {
    grid-template-columns: 1fr;
  }
}

results in error

TypeError: Cannot read property 'grid' of undefined
@ai

This comment has been minimized.

Copy link
Member

@ai ai commented Oct 22, 2019

@smashercosmo sorry, I missed this issue.

This code works without any problem:

let autoprefixer = require('.')
let postcss = require('postcss')

let css = `
@supports (grid-template-columns: 1fr) {
  .columns {
    grid-template-columns: 1fr;
  }
}`

console.log(postcss([autoprefixer({ grid: 'autoplace' })]).process(css).css)

Maybe the bug was fixed? Can you check it again? If the issue is still actual, can you give me full stack trace?

@ai ai added the bug label Oct 22, 2019
@smashercosmo

This comment has been minimized.

Copy link
Author

@smashercosmo smashercosmo commented Oct 22, 2019

If you paste this code into https://autoprefixer.github.io/ you'll get this error (but it's possible that this service uses the old version of autoprefxer)

@smashercosmo

This comment has been minimized.

Copy link
Author

@smashercosmo smashercosmo commented Oct 22, 2019

Yes, it uses autoprefixer@9.6.1

@ai

This comment has been minimized.

Copy link
Member

@ai ai commented Oct 22, 2019

I got the correct output in the online tool too. What browsers do you have there?

@smashercosmo

This comment has been minimized.

Copy link
Author

@smashercosmo smashercosmo commented Oct 22, 2019

You will see this error if you set last 4 version in the filter field

@ai

This comment has been minimized.

Copy link
Member

@ai ai commented Oct 22, 2019

Fixed cc827ab

@ai ai closed this Oct 22, 2019
@smashercosmo

This comment has been minimized.

Copy link
Author

@smashercosmo smashercosmo commented Oct 22, 2019

👍👍👍 thx

@ai

This comment has been minimized.

Copy link
Member

@ai ai commented Oct 24, 2019

Released in 9.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.