Recipe 17.4
Modifying Stylesheets at Runtime
Code
JavaScript
const [stylesheet] = document.styleSheets;
stylesheet.insertRule(`
.some-selector {
background-color: red;
}
`);