r/javascript • • Jun 18 '20

Don't model dark mode with a boolean

https://dev.to/sebastienlorber/insight-4-don-t-model-dark-mode-with-a-boolean-ol1
2 Upvotes

15 comments sorted by

View all comments

16

u/Eggy1337 Jun 18 '20

This article is so stupid.

-2

u/Eggy1337 Jun 18 '20 edited Jun 18 '20
  1. No one in their right mind is using media queries which aren't widely supported without a fallback.

  2. No one in negating possibility of new values for this query. If they will be added to the spec and impement by browser vendors, people will adjust to it.

  3. Hacky solutions to setting color scheme shouldn't be supported by browsers.

  4. People will name their blog posts whatever they like.

  5. Value for this media query is literally "light | dark" in spec which you queted(!).

1

u/ilovevue Jun 18 '20 edited Oct 10 '24

yam screw threatening noxious alleged shocking sort desert marble childlike

This post was mass deleted and anonymized with Redact

1

u/Eggy1337 Jun 18 '20

That's a mistake, I should've said media features(https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries#Media_features)

prefers-color-scheme is not supported in old edge for instance.

1

u/ilovevue Jun 18 '20 edited Oct 10 '24

existence teeny dolls rustic retire degree quack gaze cagey enjoy

This post was mass deleted and anonymized with Redact