-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Fix missing escape less calc #30453
Fix missing escape less calc #30453
Conversation
Hi @mrtuvn. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review. For more details, please, review the Magento Contributor Guide documentation. 🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
@krzksz can you review this ? Thanks |
c2b2e7f
to
8711605
Compare
Hi @mrtuvn, thank you for your contribution! |
Hi @mrtuvn. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review. For more details, please, review the Magento Contributor Guide documentation. |
Oops, sorry, just pressed wrong button. Re-opened. |
@magento run all tests |
Hi @ihor-sviziev, thank you for the review. |
Hi @ptylek, thank you for the review. |
✔️ QA Passed Case 1.
Before: ✖️ .admin__payment-method-wrapper {width: calc(47%);} After: ✔️ .admin__payment-method-wrapper {width: calc(50% - 3rem);} Case 2
Before: ✖️ .block-reorder .product-item-name {width: calc(80%);} After: ✔️ .block-reorder .product-item-name {width: calc(100% - 20px);} |
@magento create issue |
Hi @mrtuvn, thank you for your contribution! |
Description (*)
We've escaped the content in the calc, this way the calc in the css output file will be correctly. Previously magento will return wrong calc value
Less: width: calc(100% - 20px);
Before fix
.block-reorder .product-item-name { float: left; width: calc(80%); }
Less: width: calc(~'100% - 20px');
After fix
.block-reorder .product-item-name { float: left; width: calc(100% - 20px); }
If less code contain variable escape will a little bit difference
Instead write like this: width: calc(100% - @indent__l);
We should write like this
width: ~'calc(100% - @{indent__l})';
or
width: calc(~'100% -' @{indent__l});
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Scenario 1
Backend theme change
Scenario 2
Luma theme change
Questions or comments
Contribution checklist (*)
Resolved issues: