Skip to content
This repository was archived by the owner on Sep 29, 2024. It is now read-only.

[question] separation of concerns - should preset-env be removed from precss? #130

Open
diverent2 opened this issue Apr 25, 2019 · 0 comments

Comments

@diverent2
Copy link

diverent2 commented Apr 25, 2019

Open discussion about separation of concerns

Background

Hey there,
I´ve been working with this plugin-set for a while and really like it. 👍
Recently I´ve upgraded to the newest version and suddenly noticed some overwrite issues with postcss-preset-env which I´ve had included as a separate plugin.

Basically what happened was that I initiated autoprefixer twice by the means of the two postcss-preset-env´s.
I was able to find out about passing options and deactivating* a plugin in the options wiki page through another issue. Meaning I know how to handle this problem.

*update: I just realized that there is no option to disable plugins any longer :/

So basically this plugin

lets you use Sass-like markup and staged CSS features in CSS.

or in my own words: It´s Postcss Sass-(a)like. 😅
And that´s great!

However I was wondering what Postcss-Preset-Env is doing in precss in first place. 🤔
Don´t get me wrong. I also love using this plugin.
My "issue" lies in the task it fulfills:

postcss-preset-env lets you convert modern CSS into something most browsers can understand

in my own words again: It´s babel for css. 😅

So we basically have two very different tasks:

  • allow sass structure
  • convert css for old browsers and enable new cool (draft) features

Question

Wouldn´t it be better to keep those two jobs/plugins separated, since they tackle different fields of concern?
Should Precss include preset-env at all?

Would like to discuss this question, if you are willing to :)

Best Regards
Maxi / Diverent2

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant