User:Canadabonk/sandbox.js: Difference between revisions

From TestWiki
Content added Content deleted
No edit summary
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');
mw.util.addCSS(newCSSVariables);
const newCSSVariables = `
const newCSSVariables = `
:root {
:root {
Line 13: Line 11:
}
}
`;
`;
mw.util.addCSS(newCSSVariables);


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);
	

		
		
});