autorepfixer does not respect rules
See original GitHub issueIs 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
node -v
: v8.9.1npm -v
: 5.6.0yarn --version
(if you use Yarn): 1.5.2npm ls react-scripts
(if you haven’t ejected):
Then, specify:
- Operating system: Ubuntu based
- Browser and version (if relevant):
Steps to Reproduce
(Write your steps here:)
npm i -g create-react-app
create-react-app autoprefixer
- add
.demo { display: grid }
to App.css file yarn build
- 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}
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:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This isn’t a
create-react-app
bug, being thatautoprefixer
has CSS Grid Layout prefixing disabled by default and to my knowledgecreate-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.
Grid is off by default. This will be documented.