question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

autorepfixer does not respect rules

See original GitHub issue

Is this a bug report?

YES

Did you try recovering your dependencies?

Fresh install create-react-app: 1.5.2 YARN version v1.3.2

Which terms did you search for in User Guide?

autoprefixer, css, display: grid

Environment

  1. node -v: v8.9.1
  2. npm -v: 5.6.0
  3. yarn --version (if you use Yarn): 1.5.2
  4. npm ls react-scripts (if you haven’t ejected):

Then, specify:

  1. Operating system: Ubuntu based
  2. Browser and version (if relevant):

Steps to Reproduce

(Write your steps here:)

  1. npm i -g create-react-app
  2. create-react-app autoprefixer
  3. add .demo { display: grid } to App.css file
  4. yarn build
  5. open generated css file in build directory and check .demo class content

Expected Behavior

.demo {
display: -ms-grid;
display: grid;
}

Actual Behavior

.demo{display:grid}

demo

I tried to eject and change the autoprefixer option by adding grid: true it works

Folow https://github.com/postcss/autoprefixer/issues/603#issuecomment-365015199

SO please add that option to your webpack autoprefixer config by default

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
BuckyMalercommented, Feb 13, 2018

This isn’t a create-react-app bug, being that autoprefixer has CSS Grid Layout prefixing disabled by default and to my knowledge create-react-app makes no claims to CSS Grid Layout support.

However, this could be a beneficial proposal. It’s important to note though, even with autoprefixer configured to prefix Grid properties, developers will likely need to consider using feature queriers to better support IE 10+. The Grid implementation that exists in IE 10+ is based on the 2011 specification, and the implementation supported today in Chrome, Firefox, and Safari is quite different.

Rachel Andrew, has a great article discussing the challenges of Grid support in IE, which I came across when reading through MDN.

That all being said, configuring autoprefixer to prefix Grid properties would be helpful for IE, although additional CSS overhead is likely.

If it’s decided that Grid prefixing should be enabled, I’d be happy to submit a PR.

FYI, I haven’t used Grid myself just yet, but I know it’s super 🔥 right now, and will likely only grow in popularity.

0reactions
Timercommented, Sep 28, 2018

Grid is off by default. This will be documented.

Read more comments on GitHub >

github_iconTop Results From Across the Web

postcss/autoprefixer: Parse CSS and add vendor prefixes to ...
Autoprefixer can be used to translate modern CSS Grid syntax into IE 10 and IE 11 syntax, but this polyfill will not work...
Read more >
Autoprefixer: A Postprocessor for Dealing with Vendor ...
Autoprefixer parses CSS files and adds vendor prefixes to CSS rules using the Can I Use database to determine which prefixes are needed....
Read more >
Gulp autoprefixer is not prefixing - Stack Overflow
Does anyone know? Here is my gulpfile.js const gulp = require('gulp'); const autoprefixer = ...
Read more >
What is PostCSS? How to Use Plugins to Automate CSS Tasks
PostCSS is a Node.js tool that transforms your styles using ... Note: No rules are turned on by default and there are no...
Read more >
Autoprefixer vs Sass | What are the differences? - StackShare
Autoprefixer : PostCSS plugin to parse CSS and add vendor prefixes to CSS rules. It is a CSS post processor. It combs through...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found