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
css border shorthand incorrectly minified in production #35219
css border shorthand incorrectly minified in production #35219
Comments
It's an optimization enabled by cssnano, See |
Next.js is using a custom variant of the Adding
might fix the issue, but it looks like Another downside would be that it could affect most current CSS outputs negatively, so the workaround has a cost. |
there is now a fix for this issue in upstream |
Fixes #35219 ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `yarn lint`
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #33~20.04.1-Ubuntu SMP Mon Feb 7 14:25:10 UTC 2022
Binaries:
Node: 16.14.0
npm: 8.3.1
Yarn: 1.22.17
pnpm: 6.30.0
Relevant packages:
next: 12.1.1-canary.9
react: 17.0.2
react-dom: 17.0.2
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
Describe the Bug
currently, the css minifier (i think this is the compiled-in cssnano-simple) produces invalid css from the following:
results in:
which is invalid.
note that this is currently also handled incorrectly in upstream
cssnano
with the default preset, but works correctly with the "lite" preset. cf. cssnano/cssnano#1354Expected Behavior
don't collapse border properties into shorthand when custom properties are encountered
To Reproduce
yarn dev
vsyarn build && yarn start
The text was updated successfully, but these errors were encountered: