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

Browserlist support #67

Open
leimonio opened this issue Jan 20, 2019 · 7 comments
Open

Browserlist support #67

leimonio opened this issue Jan 20, 2019 · 7 comments

Comments

@leimonio
Copy link

This is more a kind of question:

  • Would it make sense if postcss-calc transformations were based on the browsers support configured through browserlist?
  • How would this affect postcss-calc?
  • If postcss-calc is not the correct repository to implement such logic, which one would be? Would it be cssnano-preset-default or a different one?

For example by using cssnano-preset-default we can define this configuration in postcss.config.js:

module.exports = {
   plugins: [
       require('cssnano')({
         preset: ['default', {
             calc: false,
         }]
       }),
   ],
};
@alexander-akait
Copy link
Collaborator

@leimonio what transformation of calc doesn't work in some browsers, but works in other?

@leimonio
Copy link
Author

I mean mostly based on browser support. e.g. there are browsers supporting inner calc whereas others not, right? Or otherwise, based on full/partial/not all support enable different strategies of transformations or totally disable them. I'm not sure if this makes sense.

@alexander-akait
Copy link
Collaborator

@leimonio

I mean mostly based on browser support. e.g. there are browsers supporting inner calc whereas others not, right?

Yep you are right https://caniuse.com/#search=calc (Known issues), feel free to send a PR

@alexander-akait
Copy link
Collaborator

It should be easy and you can see how we do this in cssnano

@leimonio
Copy link
Author

Sounds good, I'll a look at the repo. Is there something you'd like to share as guidance?
Closing this issue, since it's irrelevant to the scope of this repo.

@alexander-akait
Copy link
Collaborator

@leimonio don't this it is out of scope, because i can't disable some changes in calc optimization in cssnano, let's open this

@leimonio leimonio reopened this Jan 25, 2019
@leimonio leimonio reopened this Jan 25, 2019
@leimonio
Copy link
Author

Accidentally closed it twice. I’d like to contribute on that.

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

No branches or pull requests

3 participants