videoPlayer test page
Starting point for running unit tests with Jasmine in JSFiddle. Simply fork this fiddle to get started.
CSS
:root {
--color-a: linear-gradient(120deg, #155799, #159957);
--color-b: linear-gradient(0deg, #522db8 0%, #1c7ce0 100%);
--color-c: linear-gradient(45deg, #102eff, #d2379b);
}
html,
body {
height: 100%;
margin: 0;
padding: 0;
}
body {
background-repeat: no-repeat;
}
JavaScript
(function randomBackground() {
const varNames = [
"color-a",
"color-b",
"color-c"
];
const random = Math.floor(Math.random() * varNames.length);
document.body.style.backgroundImage = 'var(--' + varNames[random] + ')';
}());