postcss / postcss-calc

PostCSS plugin to reduce calc()
MIT License
213 stars 34 forks source link

Browserlist support #67

Open leimonio opened 5 years ago

leimonio commented 5 years ago

This is more a kind of question:

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 commented 5 years ago

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

leimonio commented 5 years ago

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 commented 5 years ago

@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 commented 5 years ago

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

leimonio commented 5 years ago

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 commented 5 years ago

@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 commented 5 years ago

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