csstools / postcss-normalize

Use the parts of normalize.css (or sanitize.css) you need from your browserslist
Creative Commons Zero v1.0 Universal
816 stars 40 forks source link

Support @import "node_modules/postcss-normalize/lib/normalize.css" #27

Closed sntran closed 6 years ago

sntran commented 6 years ago

Let me explain:

During development, I use the CSS file as-is, without any pre- or post-processor. I only run postcss and postcss-normalize when building for production.

In order to have normalize.css in development, I needs to be able to import it from node_modules. I can't use @import-normalize nor `@import "postcss-normalize".

It would be great if this plugin can detect the @importfrom path containing "node_modules/postcss-normalize/lib/normalize.css" besides @import-normalize so I can see the normalized styles in both environments.

stramel commented 6 years ago

@sntran Move the @import-normalize to another file without any @imports then use @import <path/to/file> to load it in.

jonathantneal commented 6 years ago

I would follow what @stramel has said, unless we can modify those import plugins (which is very unlikely).

sntran commented 4 years ago

Sorry for being an idiot, but I don't see how @stramel suggested would work? During development, I don't run my file through postcss. Having a file with @import-normalize would not resolve to anything, and I won't see normalize stuffs in development.