Skip to content

Commit cfe5aa3

Browse files
committed
chore: added color as global var
1 parent e121a0a commit cfe5aa3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

frontend/utils/themeUtils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ export function setAppBgFromAdminBarBg() {
2828
const bitAppsRootElm = select('#bit-apps-root')
2929
const wpAdminBarElm = select('#wpadminbar')
3030
if (bitAppsRootElm && wpAdminBarElm) {
31-
bitAppsRootElm.style.backgroundColor = globalThis.getComputedStyle(wpAdminBarElm)?.backgroundColor
31+
const bgColor = globalThis.getComputedStyle(wpAdminBarElm)?.backgroundColor
32+
bitAppsRootElm.style.backgroundColor = bgColor
33+
document.documentElement.style.setProperty('--wp-bg-color', bgColor)
3234
}
3335
}
3436

0 commit comments

Comments
 (0)