Disable Dark Mode completely in Casper with code injection

Hi everyone,

Is there a way to turn off the dark mode in Casper?


You can disable it by deleting the Css codes m

There’s definitely a dark mode on Casper.

It automatically switches from normal to dark depending on your computer settings.

Yeah, I understand it’s not possible with code injection.

Which lines are we talking about exactly? I can’t find any documentation about it.

Which theme you are using?


You can find it in screen.css. 12th section.

Thanks. I’ve removed that part but it’s still displaying the dark mode.

I think I’m also supposed to remove lines in /built/screen.css but I don’t know which ones exactly.

goto assets/css/screen.css

Open it with VSCode and type yarn dev in terminal. And then delete whole darkmode section and save. Then the file will be complie. Now you can go.

It worked for me.

That worked! Thanks a lot.

1 Like

I think its better to mark the solution, then someone can get easily how to do it.