Skip to content

[Issue] fix conflict for logo_height argument by default.xml #30377

Open
@m2-assistant

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:
Schermata 2020-10-07 alle 19 56 30
Schermata 2020-10-07 alle 19 56 42

The result is that our rule is overwritten:
Schermata 2020-10-07 alle 19 22 14

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 (*)

  1. Magento 2.4-develop

  2. Create a new theme child of Luma

  3. 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>
    
  4. Put your custom logo.png inside the images folder.

  5. Save and delete the cache

  6. 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)

Metadata

Assignees

No one assigned

    Labels

    Event: Distributed CD India 2020Issue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P4No current plan to fix. Fixing can be deferred as a logical part of more important work.Progress: PR in progressReported on 2.4.0Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S4Affects aesthetics, professional look and feel, “quality” or “usability”.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions