-
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
Fixed issue with lib-line-height mixin failing when value of 'normal'… #18168
Fixed issue with lib-line-height mixin failing when value of 'normal'… #18168
Conversation
Hi @CNanninga. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
@CNanninga thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository. |
@magento-engcom-team - I followed the link, but didn't get any indication that an action was completed. (Just got redirected to the repository home page.) |
Hi @CNanninga I can see next to your name it now says 'Member' which is what the link should setup so it looks to have worked fine. |
Hi @CNanninga. Thank you for your contribution. Please, consider to port this solution to 2.3 release line. |
Description
This fixes an issue with the lib-line-height LESS mixin that results in an error during compilation if a value of "normal" is passed in.
Issue Reproduction Steps
Alternate Reproduction Steps
A common scenario that will cause this is if the mixin .lib-inline-block-space-item is used without parameters, as "normal" is passed in as the default value for @_line-height, which is then passed to .lib-line-height.
Additional Information
This issue became more prominent/likely in 2.2.6, because previously the definition of .lib-inline-block-space-item used a simple "line-height: @_line-height" declaration, whereas now it calls .lib-line-height with the value.
The first definition of .lib-line-height - with the guard "when not (@heightValue = false) and not (ispercentage(@heightValue)" - is the one that is matched if "normal" is passed in. This definition uses the mixin .lib-font-size-value, which does mathematical calculations on the value that are not valid for a value of "normal."
Fix
Placed additional guards on the first definition of .lib-line-height so that it does not match the value of "normal," and added a new definition that matches this value, avoiding the .lib-font-size-value call.