yonicd / jsTree

R htmlwidget for inspecting heirachal structures with the ‘jQuery’ ‘jsTree’ Plugin.
https://yonicd.github.io/jsTree/
Other
31 stars 7 forks source link

conflict with shinyDashboard css nav #16

Open obkhan opened 5 years ago

obkhan commented 5 years ago

To allow the navigation bar in shinyDashboard to work correctly there is a css conflict. I've had to use the following when coupling shinyDashboard which also has "nav" in the dom

dashboardBody( tags$style(HTML(' nav { float: none !important; padding: 0 !important; max-width: none !important; } '))

otherwise it will cause the navigation bar to be skewed ; perhaps in the css and object nav could be called something more unique due to the conflict with shinyDashboard?

yonicd commented 5 years ago

this css class is from the jsTree js library, i dont think that I should change it internally just for dashboard. Users control the css to their use-case.

obkhan commented 5 years ago

Good point ; would it be possible in that case to provide an override css in the htmlwidget setup? such as an option maybe to use an alternative css? The style with the !important above does indeed address the issue ; would you have any suggestions other than what I did that could be a cleaner approach? The css gets installed with the R package - so I'm not sure of the best approach ; thank you for the quick feedback!!!

yonicd commented 5 years ago

i'll try to see if i can add a parameter for css settings to pass with the call to widget. it may take me some time to get to it.