Skip to content

Commit

Permalink
fix: CSS rendering bug, again (mealie-recipes#2555)
Browse files Browse the repository at this point in the history
* idk man

* that wasn't supposed to be there
  • Loading branch information
michael-genson committed Sep 19, 2023
1 parent 3e5596f commit a22d500
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/plugins/dark-mode.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const darkModePlugin: Plugin = ({ $vuetify }, _) => {
const isDark = useDark();

// Vuetify metadata is bugged and doesn't render dark mode fully when called immediately
// Adding a 0.5 millisecond delay fixes this problem
// Adding a 100 millisecond delay fixes this problem
// https://stackoverflow.com/questions/69399797/vuetify-darkmode-colors-wrong-after-page-reload
setTimeout( () => { $vuetify.theme.dark = isDark.value; }, 0.5);
setTimeout(() => { $vuetify.theme.dark = isDark.value; }, 100);
};

export default darkModePlugin;

0 comments on commit a22d500

Please sign in to comment.