23
submitted 7 months ago by LemmyQuest@lemm.ee to c/asklemmy@lemmy.world
top 9 comments
sorted by: hot top controversial new old
[-] alphapuggle@programming.dev 24 points 7 months ago* (last edited 7 months ago)
[-] RustyNova@lemmy.world 13 points 7 months ago
[-] leraje@lemmy.blahaj.zone 5 points 7 months ago* (last edited 7 months ago)

If you're not wanting to use JS then you're reliant on the users browser supporting prefers-color-scheme (caniuse) or forcing them to reload the page.

[-] cloudless@feddit.uk 4 points 7 months ago
[-] slazer2au@lemmy.world 4 points 7 months ago
[-] droning_in_my_ears@lemmy.world 0 points 7 months ago* (last edited 7 months ago)

You can style both dark mode and light mode with CSS but the question is how will you toggle between them? A button? Then you need JavaScript

[-] Zak@lemmy.world 5 points 7 months ago

The user can toggle their operating system's setting. During development, the developer can do it in their browser's dev tools.

[-] Asudox@lemmy.world -5 points 7 months ago

Locking as this post violates rule 5.

this post was submitted on 21 Mar 2024
23 points (87.1% liked)

Ask Lemmy

26523 readers
1545 users here now

A Fediverse community for open-ended, thought provoking questions


Rules: (interactive)


1) Be nice and; have funDoxxing, trolling, sealioning, racism, and toxicity are not welcomed in AskLemmy. Remember what your mother said: if you can't say something nice, don't say anything at all. In addition, the site-wide Lemmy.world terms of service also apply here. Please familiarize yourself with them


2) All posts must end with a '?'This is sort of like Jeopardy. Please phrase all post titles in the form of a proper question ending with ?


3) No spamPlease do not flood the community with nonsense. Actual suspected spammers will be banned on site. No astroturfing.


4) NSFW is okay, within reasonJust remember to tag posts with either a content warning or a [NSFW] tag. Overtly sexual posts are not allowed, please direct them to either !asklemmyafterdark@lemmy.world or !asklemmynsfw@lemmynsfw.com. NSFW comments should be restricted to posts tagged [NSFW].


5) This is not a support community.
It is not a place for 'how do I?', type questions. If you have any questions regarding the site itself or would like to report a community, please direct them to Lemmy.world Support or email info@lemmy.world. For other questions check our partnered communities list, or use the search function.


Reminder: The terms of service apply here too.

Partnered Communities:

Tech Support

No Stupid Questions

You Should Know

Reddit

Jokes

Ask Ouija


Logo design credit goes to: tubbadu


founded 1 year ago
MODERATORS