aboutsummaryrefslogtreecommitdiffstats
path: root/src/shared/styling.ts
blob: 3ec25c83ec2ed1dc4e947b8397600a6e0b4d37ca (plain)
1
2
3
4
5
6
7
8
9
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];
		}
	}
};