Description
This issue is automatically created based on existing pull request: #30370: fix conflict for logo_height argument by default.xml
Description (*)
For a new theme, for example child of luma, if you want change the logo by default.xml and set also his size by the height, you should write this:
<referenceBlock name="logo"> <arguments> <argument name="logo_file" xsi:type="string">images/logo.png</argument> <argument name="logo_height" xsi:type="number">300</argument> </arguments> </referenceBlock>
Now the problem is that it doesn't works, because there is a conflict with the line 151 of _module.less:
The result is that our rule is overwritten:
It doesn't happen with Width.
Sometime we want set the image by height and not by the width... or maybe with both... why not? It's your choice.
So for now the logo_height have no sense to exist.
The height: auto should be deleted and all will work fine.
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
-
Magento 2.4-develop
-
Create a new theme child of Luma
-
Create the default.xml and copy this:
<referenceBlock name="logo"> <arguments> <argument name="logo_file" xsi:type="string">images/logo.png</argument> <argument name="logo_height" xsi:type="number">300</argument> </arguments> </referenceBlock>
-
Put your custom logo.png inside the images folder.
-
Save and delete the cache
-
Refresh the page
Questions or comments
Contribution checklist (*)
- Pull request has a meaningful description of its purpose
- All commits are accompanied by meaningful commit messages
- All new or changed code is covered with unit/integration tests (if applicable)
- All automated tests passed successfully (all builds are green)