postcss-calc
postcss-calc copied to clipboard
Browserlist support
This is more a kind of question:
- Would it make sense if
postcss-calc
transformations were based on the browsers support configured throughbrowserlist
? - How would this affect
postcss-calc
? - If
postcss-calc
is not the correct repository to implement such logic, which one would be? Would it becssnano-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,
}]
}),
],
};
@leimonio what transformation of calc
doesn't work in some browsers, but works in other?
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.
@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
It should be easy and you can see how we do this in cssnano
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.
@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
Accidentally closed it twice. I’d like to contribute on that.