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

Add postcss-use plugin #213

Closed
Jabher opened this issue Jul 26, 2016 · 5 comments · May be fixed by marcusrc/create-react-app#1
Closed

Add postcss-use plugin #213

Jabher opened this issue Jul 26, 2016 · 5 comments · May be fixed by marcusrc/create-react-app#1

Comments

@Jabher
Copy link

Jabher commented Jul 26, 2016

And one more thing for today 😅

I think it would be nice to add postcss-use plugin into build pipeline.
I think it will organically fit with package core idea - "zero-configuration". So for current builds nothing will actually change, no new filesystem APIs, no additional keys in CLI, however, the ability to use postcss plugins will suddenly appear.

The thing is that by default it's all same css (OK, with autoprefixer), but you can use @use keyword to add postcss plugins.

@use cssnext;

:root {
    --background: #222;
}

.App-header {
    background-color: var(--background);
}

If that seems ligit, I already have a commit for PR - https://github.com/Jabher/create-react-app/tree/feature/postcss-use.

@gaearon
Copy link
Contributor

gaearon commented Jul 26, 2016

I don’t think we want to commit to supporting the PostCSS ecosystem right now. We use autoprefixer as an implementation detail, but we don’t want to lock ourselves into PostCSS yet. Thanks for the suggestion though!

@FezVrasta
Copy link
Contributor

Any updates on this? It would be a great way to enable us to use PostCSS and it would be optional without any additional config.

(well, I'd love a way to define a PostCSS preprocessor... like SugarSS)

@gaearon
Copy link
Contributor

gaearon commented Dec 19, 2016

No, there are no updates on this. (Usually if there are updates, they appear on the issue. 😉 )

it would be optional without any additional config.

While it would be “optional”, the reality is that we’d have to keep supporting it forever because some people would rely on it. This could hurt our ability to integrate other (potentially incompatible) tools.

For now our stance is that if you want CSS preprocessors, you should use their command-line utilities to compile the styles down to regular CSS. Then you can import that CSS in your components.

@quantuminformation
Copy link

I've pretty much moved all my stylus and less projects over to PostCSS as I see it as the future.

I find that this config is all I need to replicate my Less and Stylus needs:

https://github.com/quantumjs/solar-popup/blob/master/postcss.config.js

Looks like I'll have to stick to css for now, but its good enough.

@joshuarrr
Copy link

joshuarrr commented Apr 25, 2017

This could hurt our ability to integrate other (potentially incompatible) tools.

What other tools? Is there something better at post processing css on the horizon? Since postcss is already being used as 'an implementation detail' it seems incomplete to not support other plugins, and a bummer that I would have to had to eject to use them.

@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants