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

Ask Lemmy

27049 readers
1731 users here now

A Fediverse community for open-ended, thought provoking questions

Please don't post about US Politics. If you need to do this, try [email protected]


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 [email protected] or [email protected]. 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 [email protected]. 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
top 9 comments
sorted by: hot top controversial new old
[–] alphapuggle 24 points 8 months ago* (last edited 8 months ago)
[–] [email protected] 13 points 8 months ago
[–] [email protected] 5 points 8 months ago* (last edited 8 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.

[–] [email protected] 4 points 8 months ago
[–] [email protected] 4 points 8 months ago
[–] [email protected] 0 points 8 months ago* (last edited 8 months ago) (1 children)

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

[–] [email protected] 5 points 8 months ago

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

[–] [email protected] -5 points 8 months ago

Locking as this post violates rule 5.