Skip to content
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

Icon breaks line with title inside Scale-Telekom-Mega-Menu-Column #2380

Open
AC40 opened this issue Jan 13, 2025 · 2 comments
Open

Icon breaks line with title inside Scale-Telekom-Mega-Menu-Column #2380

AC40 opened this issue Jan 13, 2025 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@AC40
Copy link

AC40 commented Jan 13, 2025

Scale Version
3.0.0-beta.154

Framework and version
Plain HTML and Scale Components

Current Behavior
The icon of the mega-menu-column link (title above each column) breaks lines on viewports close to the breakpoint at which the desktop nav menu is replaced with the mobile nav menu.
This make sthe hierarchy and relationship between icon and title confusing and visually unclear for users.
Screenshot 2025-01-13 114713

Expected Behavior
There are two possible, "better", solutions:

  1. The icon remains top-aligned with the title. In case of word wrap, it is still on the same height as the first and topmost word of the title.
  2. The icon remains center-aligned with the title. In case of word wrap, it is in the middle of the total height of the title.
    Screenshot 2025-01-13 114713
    Screenshot 2025-01-13 114713

Code Reproduction
Any of the official scale examples with multiple levels work (e.g.: examples/telekom-header-samples/mega-menu

        <scale-telekom-mobile-menu slot="mobile-main-nav" app-name-link="/bar">
            <scale-telekom-mobile-menu-item active>
              <a href="#">Topic One</a>
              <scale-telekom-mobile-menu-item active slot="children">
                <a href="#">Second Level</a>
                <scale-telekom-mobile-menu-item slot="children">
                  <a href="#">Third Level</a>
                </scale-telekom-mobile-menu-item>
              </scale-telekom-mobile-menu-item>
            </scale-telekom-mobile-menu-item>
          </scale-telekom-mobile-menu>
      </scale-telekom-mobile-flyout-canvas>
    </scale-telekom-nav-flyout>
  </scale-telekom-nav-item>
</scale-telekom-nav-list>
<!-- main navigation (desktop) -->
<scale-telekom-nav-list variant="main-nav" slot="main-nav">
  <scale-telekom-nav-item active>
    <a href="#">Topic One</a>
  </scale-telekom-nav-item>
  </scale-telekom-nav-item>
</scale-telekom-nav-list>

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Chrome, Firefox
  • Version 131.0.6778.205 (Chrome), 133 (Firefox)
@AC40 AC40 added the bug Something isn't working label Jan 13, 2025
@amir-ba amir-ba added the good first issue Good for newcomers label Jan 22, 2025
@amir-ba
Copy link
Collaborator

amir-ba commented Jan 22, 2025

thank you @AC40 for creating a detailed issue. you can override the scale-telekom-mega-menu-colum css to have this resolved for you until we have the time to add the fix in the source code.
check the css changes in this sandbox for example

@AC40
Copy link
Author

AC40 commented Jan 24, 2025

Thank you @amir-ba for the sandbox, your fix works well for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants