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

Navbar without hamburger unnecessary css #2848

Open
Stelu77 opened this issue Mar 28, 2024 · 1 comment
Open

Navbar without hamburger unnecessary css #2848

Stelu77 opened this issue Mar 28, 2024 · 1 comment

Comments

@Stelu77
Copy link

Stelu77 commented Mar 28, 2024

Describe the bug
When using the mj-navbar without hamburger menu there are still a large CSS block rendered in the head for the menu feature.

To Reproduce
Try it out sample

Expected behavior
This css block should only be rendered in HTML if hamburger attribute are set.

<style type="text/css">
    noinput.mj-menu-checkbox {
      display: block !important;
      max-height: none !important;
      visibility: visible !important;
    }

    @media only screen and (max-width:480px) {
      .mj-menu-checkbox[type="checkbox"]~.mj-inline-links {
        display: none !important;
      }

      .mj-menu-checkbox[type="checkbox"]:checked~.mj-inline-links,
      .mj-menu-checkbox[type="checkbox"]~.mj-menu-trigger {
        display: block !important;
        max-width: none !important;
        max-height: none !important;
        font-size: inherit !important;
      }

      .mj-menu-checkbox[type="checkbox"]~.mj-inline-links>a {
        display: block !important;
      }

      .mj-menu-checkbox[type="checkbox"]:checked~.mj-menu-trigger .mj-menu-icon-close {
        display: block !important;
      }

      .mj-menu-checkbox[type="checkbox"]:checked~.mj-menu-trigger .mj-menu-icon-open {
        display: none !important;
      }
    }
  </style>

MJML environment (please complete the following information):
Try it out editor.

@iRyusa
Copy link
Member

iRyusa commented Apr 9, 2024

😬 that's really interesting to fix but with current implem I don't think we can fix it yet...

Keeping this open if anyone willing to work on this.

Nice finding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants