How do I make the background black when a switch is flipped?

@jonatandor35
Would be cool to see an example. Never worked with custom-elements before.