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.05k stars 586 forks source link

Update Readme #286

Closed jb1361 closed 5 years ago

jb1361 commented 5 years ago

I added a missing style for the menu wrapper class.

negomi commented 5 years ago

Hey @jb1361,

This is sort of deliberately undocumented because this element is mostly used internally for the animations, rather than visual style customization.

I'm not sure of many use cases for applying custom styles to it, and I don't want people to try to change it when they don't need to because it can break the animations in unexpected ways.

Did you have a use case for customizing it?

jb1361 commented 5 years ago

Hello @negomi,

It was sort of a hack since I did not implement it in the exact way given from the readme. The overlay was pushed below my header and I needed to apply a style to fix it. I was only using the default animation and had no need for the other ones.

After doing some digging I found that I could apply the styles based on the contents of this PR. I figured someone else may run into a scenario where they will need to style those classes. I can close this PR unless you would like to have it documented but with some way of telling a user about it's dangers.

negomi commented 5 years ago

Ah that makes sense. Ok, maybe it is better to document it, but with a disclaimer. Something like this would be great:

/*
Sidebar wrapper styles
Note: Beware of modifying this element as it can break the animations - you should not need to touch it in most cases
*/