Skip to content

Commit 61c9b93

Browse files
committed
chore: add documentation for createCssText
1 parent 8ac5302 commit 61c9b93

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

web/store/theme.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,12 @@ export const useThemeStore = defineStore('theme', () => {
200200
activeColorVariables.value = customTheme;
201201
};
202202

203+
/**
204+
* Creates a string of CSS rules preserving existing rules that are not defined in the theme variables
205+
* @param themeVariables - The theme variables to apply
206+
* @param body - The body element to apply the CSS to
207+
* @returns A string of CSS rules
208+
*/
203209
const createCssText = (themeVariables: ThemeVariables, body: HTMLBodyElement) => {
204210
const existingStyles = body.style.cssText
205211
.split(';')

0 commit comments

Comments
 (0)