User:Canadabonk/sandbox.js: Difference between revisions
Content added Content deleted
Canadabonk (talk | contribs) No edit summary |
Canadabonk (talk | contribs) No edit summary |
||
Line 6: | Line 6: | ||
linkColor = $('.wds-list.wds-is-linked li:hover > a').css('color'); |
linkColor = $('.wds-list.wds-is-linked li:hover > a').css('color'); |
||
⚫ | |||
⚫ | |||
const newCSSVariables = ` |
const newCSSVariables = ` |
||
:root { |
:root { |
||
Line 13: | Line 11: | ||
} |
} |
||
`; |
`; |
||
⚫ | |||
⚫ | |||
Revision as of 15:30, 12 June 2024
$(document).ready(function(){
const
mainBackgroundColor = $('body').css('background-color'),
contentBackgroundColor = $('#mw-content').css('background-color'),
fontColor = $('#mw-content').css('color'),
linkColor = $('.wds-list.wds-is-linked li:hover > a').css('color');
const newCSSVariables = `
:root {
--main-background-color: ${mainBackgroundColor};
}
`;
mw.util.addCSS(newCSSVariables);
});