aboutsummaryrefslogtreecommitdiffstats
path: root/src/shared/styling.ts
blob: 0e527d99b95580c1e0322e9078342ad65ad15c32 (plain)
1
2
3
4
5
6
7
8
export const styles = (selector: string, styles: { [key: string]: string }) => {
	const  elements = Array.from(document.querySelectorAll(selector)) as HTMLElement[];
	for (const element of elements) {
		for (const styleType in styles) {
			element.style[styleType as any] = styles[styleType];
		}
	}
};