Css path to plotly js legend

I want to style the legend so there is a border… I have been playing around with css but can’t seem to find the correct css path. Also I want to try and make each trace option look like a button … Anyone can help? Here is my css so far

.plotly-chart.js-plotly-plot .plot.container-plotly .svg-container .main-svg .infolayer .legend {
border-width: 1;
border-radius: 5px;
border-style: solid;
}

We don’t recommend using CSS for this.

You should trying using https://plot.ly/javascript/reference/#layout-legend-bordercolor instead.