#I am having a FART (flash-of-inaccurate-color-theme) problem in my application with Mantine

3 messages · Page 1 of 1 (latest)

tardy prawn
#

About FART, https://css-tricks.com/flash-of-inaccurate-color-theme-fart

Hey, I'm using Mantine to build something similar to Mantine UI. I have a component where you can choose one of several themes. I did this by wrapping MantineProvider with a ThemeProvider that tracks the current MantineTheme instance and saves it to local storage.

However, when the current theme is different from the default, there is an inaccurate color theme flash. Is there any way to fix this in Mantine? I've solved this in other projects (like this one, https://willpinha.github.io/daisy-components) by defining a class like <html class="theme-x"> in <head> with JavaScript, but I've never done this with Mantine

I am using Remix

There is a lot to think about when implementing a dark mode theme on a website. We have a huge guide on it. There are some very clever quick wins out there,

#

Is there a function in Mantine that takes a MantineTheme instance and converts it to a style tag? I think that would solve my problem

azure venture