question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not able to overwrite the inline style of bm-overlay or bm-menu-wrap

See original GitHub issue

I found no way to overwrite the inline style of bm-overlay or bm-menu-wrap.

I have a page like below.

image

I put the burger menu in the header which has a fixed width and is located in the center.

<div id="outer-container">
  <div id="page-wrap">
     <div id="header">
          <Menu pageWrapId={"page-wrap"} outerContainerId={"outer-container"}  >
              <a id="home" className="menu-item" href="/">Home</a>
              <a id="about" className="menu-item" href="/about">About</a>
              <a id="contact" className="menu-item" href="/contact">Contact</a>
              <a className="menu-item--small" href="">Settings</a>
            </Menu>
     </div>   
     <div id="content">
     </div>   
  </div>   
</div> 

It shows the menu as below even IsOpen property is false.

image

I think it happend because of the transform: translate3d(-100%, 0px, 0px) of bm-menu-wrap.

If I move Menu out of header DIV then it works. but the hurger icon will be out of header as well.

I am thinking to overwrite the bm-burger-button but it is hard to make it look like it’s in header div.

And I am not able to overwrite the translate3d of bm-menu-wrap from CSS as well.

How do I fix it? Am I missing something? Thanks.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
negomicommented, Jan 2, 2018

Hmm ok. If you wanted to link me your code somewhere I can run it, I’m happy to take a look at why this is necessary. I think there’s probably a simpler way to get around this, but glad you found a solution for now 😃

0reactions
nikkiczxcommented, Mar 6, 2018

I found another way around this. I changed the value of the translate3d inside baseStyles.js from -100% to -110% in the menuWrap function. Just sharing…

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I override inline styles with external CSS?
The only way to override inline style is by using !important keyword beside the CSS rule. ... Using !important is not considered as...
Read more >
Override Inline Styles with CSS
Bobby van der Sluis has a nice JS function that avoids inline styles; it's not always possible, especially if using a library.
Read more >
How to Override Inline CSS Styles - SitePoint
Read How to Override Inline CSS Styles and learn with SitePoint. Our web development and design tutorials, courses, and books will teach you ......
Read more >
How to override inline styles with external in CSS
In some circumstances, we have to do the opposite. We have to override the inline CSS which has come from foreign sources and...
Read more >
How to Override Inline CSS Styles - CSSDeck
Usually, this means spending a significant amount of time combing through old (hopefully not unorganized) code to manually delete the inline styling, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found