Fixes less/css compilation when using less.js v4 #860
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description (*)
This complements magento/magento2#38335
In your internal tickets AC-8098 & AC-9713 less.js got upgraded from v3 to v4
However, that switch is not fully backwards compatible, the math stuff now needs to be encapsulated in parentheses for less.js to do the calculation and not output it as-is to the generated css.
This module only has one mistake as far as I could find, this is the output of compiling the less code like it is right now with v4 compared to v3 and this results in invalid css:
This PR fixes it and will output
margin-bottom: 1.5rem;
again.Manual testing scenarios (*)
See testing scenario in magento/magento2#38335
Checklist