Fix inversion of emoji colours based on dark/light mode (#37120)

This commit is contained in:
diondiondion authored and GitHub committed 2025-12-05 10:08:59 +00:00
1 parent 7f1f3236c6
commit 591776d7ad
15 files changed
+86 -30

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
export function getUserTheme() {
const { userTheme } = document.documentElement.dataset;
return userTheme;
}
export function isDarkMode() {
const { userTheme } = document.documentElement.dataset;
return (
(userTheme === 'system' &&
window.matchMedia('(prefers-color-scheme: dark)').matches) ||
userTheme !== 'mastodon-light'
);
}