-
Notifications
You must be signed in to change notification settings - Fork 27.5k
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
flex: 1 1 0
compiled to flex: 1 1
#62002
Comments
Hi, This is done by the PostCSS plugin, postcss-flexbugs-fixes, and it is called flexbug-4. There's an already opened issue over there: luisrudge/postcss-flexbugs-fixes#59 Their recommended workaround is to use units, particularly %: Or you could disable it if you like... The configuration used by Next.js is roughly: {
"plugins": [
"postcss-flexbugs-fixes",
[
"postcss-preset-env",
{
"autoprefixer": {
"flexbox": "no-2009",
"grid": "autoplace"
},
"stage": 3,
"features": {
"custom-properties": false
}
}
]
]
} Taken from:
And there you could disable the bug4 fix with: In {
"plugins": [
["postcss-flexbugs-fixes", { "bug4" : false }],
[
"postcss-preset-env",
{
"autoprefixer": {
"flexbox": "no-2009",
"grid": "autoplace"
},
"stage": 3,
"features": {
"custom-properties": false
}
}
]
]
} You'd need to install Here it is in action: Run |
Thanks for the detailed answer, I guess there's nothing actionable for Next.js here. |
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Link to the code that reproduces this issue
https://github.com/benmerckx/next-flex-bug
To Reproduce
Check compiled css
Current vs. Expected behavior
The
flex-basis
value is omitted. But the browser default of 0% is not the same as the absolute 0 value.Input css:
flex: 1 1 0;
Compiled css:
flex: 1 1;
Expected css:
flex: 1 1 0;
Provide environment information
Which area(s) are affected? (Select all that apply)
Not sure
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local), next start (local), Vercel (Deployed), Other (Deployed)
Additional context
No response
The text was updated successfully, but these errors were encountered: