https://kotlinlang.org logo
#kobweb
Title
# kobweb
d

Don.Robertson

12/02/2023, 12:35 AM
Does kobweb css support @media(prefers-color-scheme)? If so, do I have to do anything to enable it in kotlin?
d

David Herman

12/02/2023, 12:53 AM
You should be able to set media queries in Kobweb, yes. Let me link to an example ..
That said, I'm not 100% sure how to query that color mode now that I think about it
I may need to investigate this a bit more
Ah so you set the query to light or dark. That should work. Just know that this is separate from how Silk UI handles dark and light modes.
d

Don.Robertson

12/02/2023, 1:04 AM
Thanks so much for your response.
d

David Herman

12/02/2023, 1:05 AM
You're welcome, although I'm worried it might be useless
Give it a try but let me know if you have any more questions, or if you can't accomplish what you're trying to do.
2 Views