negomi / react-burger-menu

:hamburger: An off-canvas sidebar component with a collection of effects and styles using CSS transitions and SVG path animations
http://negomi.github.io/react-burger-menu/
MIT License
5.04k stars 582 forks source link

Changing the `display` of `bm-item` in css does not reflect back #487

Closed jmanacup closed 1 year ago

jmanacup commented 1 year ago
          For some reason, changing the `display` of `bm-item` does not reflect back. It is still always `display: block`. Can anyone double check to see if this is only happening in my end?

Originally posted by @jmanacup in https://github.com/negomi/react-burger-menu/issues/249#issuecomment-1472725214

EDIT: I needed to add !important after changing the code to make it work. Is that how it is supposed to be?

negomi commented 1 year ago

Hi @jmanacup, if you're using CSS then yes, you would have to use !important. If passing styles as a JS object then it wouldn't be necessary.