I am trying to use and customize the side navigation component but I can not change it's background color, e.g.
ui5-side-navigation { background-color: yellow; }
does not have any effect on the component.
So the questions are:
- Can I customize this component?
- If yes, how I can change it's css properties?
Thanks
First, the documentation has a section on themes, but this implies creating an entire theme using the Theme Designer on BTP.
The reason the code above is not working, is because Web Components use shadow DOM which you can see when you inspect the element in the debugger tools.
Shadow DOM is completely encapsulated, so it has it's own styling. One way to add some styling to shadow DOM is to insert a stylesheet, like this:
Here's an example in code sandbox