aboutsummaryrefslogtreecommitdiffstats
path: root/src/shared/styling.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/styling.ts')
-rw-r--r--src/shared/styling.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/shared/styling.ts b/src/shared/styling.ts
index 759fecb..b19ace4 100644
--- a/src/shared/styling.ts
+++ b/src/shared/styling.ts
@@ -1,3 +1,10 @@
+/**
+ * Applies a set of inline CSS styles to every element matching the
+ * given CSS selector.
+ *
+ * @param selector - CSS selector string.
+ * @param styles - A map of CSS property names to values.
+ */
export function styles(selector: string, styles: Record<string, string>) {
const elements = Array.from(document.querySelectorAll(selector)) as HTMLElement[];