robinpoort / vanilla-js-responsive-menu

A vanilla JS responsive menu plugin
MIT License
33 stars 5 forks source link

Move mobile-indicator #11

Closed robinpoort closed 7 years ago

robinpoort commented 8 years ago

Move the mobile indicator to inside the menu element so namespaced CSS won't kill the functionality.

Right now when you namespace CSS like so (using SCSS):

.namespacer {
    @import "responsivemenu";
}

You get this:

.namespacer #rm-mobile-indicator { ... }

While the indictor itself is prepended to the <body> element like so:

<body>
    <nav>...</nav>
    <div id="rm-mobile-indicator"></div>
</body>

Placing it inside the menu element would give us:

<body>
    <nav>
        <ul>...</ul>
        <div id="rm-mobile-indicator"></div>
    </nav>
</body>

Shouldn't be a problem since the indicator itself virtually has no visible styling.

robinpoort commented 7 years ago

Closed in v1.1.5