cancel
Showing results for 
Search instead for 
Did you mean: 

What Js is deploying inline style to Submenu/Top navigation

What Js is deploying inline style to Submenu/Top navigation

I made some changes to a Top navigation (changing ul.submenu to div.submenu), all is fine, but I cannot find where in a Js is setup this inline style:

style="display: none; top: 53px; left: -0.453125px;"

It is part of this code:

<ul class="level0 submenu ui-menu ui-widget ui-widget-content ui-corner-all" role="menu" aria-expanded="false" style="display: none; top: 53px; left: -0.453125px;" aria-hidden="true">

I tried to find it in

magento/theme-frontend-blank/web/js/navigation-menu.js

but no luck.

I want to change this so that:

left: 0;
width: <calculate based on a platform used>;

Any help?

1 REPLY 1

Re: What Js is deploying inline style to Submenu/Top navigation

Magento 2 main frontend menu is inherited from the standard jQuery UI menu widget, and an element inline position styles are set in the jQuery UI:

https://github.com/magento/magento2/blob/487f5f45/lib/web/jquery/jquery-ui.js#L11883-L11883

 

How is the main frontend menu generated? https://mage2.pro/t/185