Open Muluk-m opened 10 months ago
Hi @Muluk-m. I think what is happening is max-content
somewhere in your project and this is being combined with something in the polyfill. Since max-content
can't be computed by CSS calc it's possibly throwing an error?
Can you find where max-content
is being used and provide the CSS rule it's inside?
Meanwhile here are a couple of things you could try:
flex-gap-polyfill
to version 4.1.2
flex-gap-polyfill
and postcss-calc
in your projectLet me know how you get on.
Thanks!
This is where I find that the component reporting an error contains the max-content
rule
/deep/ .klk-poptip-popper-inner {
width: max-content;
max-width: calc(100vw - 32px) !important;
padding: 0 36px 0 12px;
margin: 12px 0;
}
But everything worked fine until I introduced flex-gap-polyfill
postcss: {
plugins: {
'flex-gap-polyfill': {}
}
},
this is my nuxt2 config
Thank you. Ok, I see what's happening. For the polyfill to work, it needs to rewrite the width because it uses negative margins and needs to recalculate the width. Therefore when you use postcss-calc
with flex-gap-polyfill
it tries to reduce a calc function that contains max-content
.
For now you can try the following options:
max-content
with 100%
postcss-calc
when it cannot resolve them -> https://github.com/postcss/postcss-calc#warnwhencannotresolve-default-false
Hi, I encountered this problem in my project![image](https://github.com/gavinmcfarland/flex-gap-polyfill/assets/69963532/47289a8d-bf41-4d2e-bc57-c5738f4b209d)
This is my project dependency version
"flex-gap-polyfill": "1.0.4", "nuxt": "2.10.2",
Is there any way I can handle this error