MediaWiki:Vector.js: Difference between revisions

No edit summary
No edit summary
Line 27: Line 27:
// Set the initial random background color for all elements
// Set the initial random background color for all elements
function setBackgroundColors() {
function setBackgroundColors() {
   // Set for body
   // Set for root variable --background-color-base (so also body)
   document.body.style.backgroundColor = getRandomBrightColor();
   document.documentElement.style.setProperty('--background-color-base', getRandomBrightColor());
   // Set for .vector-pinned-container
   // Set for .vector-pinned-container
   const pinnedContainer = document.querySelector('.vector-pinned-container');
   const pinnedContainer = document.querySelector('.vector-pinned-container');