lcabrini

lcabrini

Theme switcher: "system" theme

I tried setting background color by theme using bg-blue-500 dark:bg-yellow-300 and that worked fine. However, the system/auto theme in the theme switcher (the one that is supposed to use the desktop theme) uses bg-blue-500 although my desktop theme variant is dark.

What is the correct way to set custom colors to an element that works with the system theme variant?

I don’t think it makes any difference but my desktop theme is Breeze dark. Browser is Brave.

Marked As Solved

LostKobrakai

LostKobrakai

The event listener is defined inline in root.html.heex by default. This is to prevent wrongly styling content while js initializes async. Also the theme setup of daisy ui is about supporting arbitrary themes, not just darkmode/lightmode. You can customize how your themes behave in you app.css. All phoenix does is set a theme name.

Last Post!

lcabrini

lcabrini

Thanks, now I get it a bit better. However, I might not understand what the “system” theme is supposed to be. For now, I’m just going to remove it from the selector.

Where Next?

Popular in Questions Top

minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

Other popular topics Top

rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New

We're in Beta

About us Mission Statement