this post was submitted on 20 Mar 2025
22 points (100.0% liked)

Web Development

3746 readers
98 users here now

Welcome to the web development community! This is a place to post, discuss, get help about, etc. anything related to web development

What is web development?

Web development is the process of creating websites or web applications

Rules/Guidelines

Related Communities

Wormhole

Some webdev blogsNot sure what to post in here? Want some web development related things to read?

Heres a couple blogs that have web development related content

CreditsIcon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 2 years ago
MODERATORS
all 16 comments
sorted by: hot top controversial new old
[–] Kissaki@programming.dev 14 points 4 days ago* (last edited 4 days ago)

I can understand the reasoning, but I would have weighed the significant benefit over the little "complexity"/content increase.

The color inversion is a significant effect. It doesn't change anything for those that use their own error pages, but significantly improves the situation for people who land on these pages and are bothered by light mode.

/edit: Their PR close comment was super short (non-telling), but they later commented with some reasonable reasoning that better describes their point of view and considerations.

[–] drkt_@lemmy.dbzer0.com 10 points 4 days ago (1 children)

I agree with this decision. Don't make error pages more complicated than they are.

[–] dan@upvote.au 31 points 4 days ago* (last edited 4 days ago) (2 children)

It's literally just one line of HTML though:

<meta name="color-scheme" content="light dark">

Not complicated at all.

[–] Boomkop3@reddthat.com 3 points 4 days ago (2 children)

And some css, and accessibility issues. Dark mode isn't actually great for everyone.

[–] dan@upvote.au 26 points 4 days ago* (last edited 4 days ago) (1 children)

It doesn't need any CSS since the Nginx error pages use the browser's default styling. The meta tag just tells the browser to use its default light or dark mode styling depending on the user's preference.

A standard behaviour on all sites that properly implement dark mode is that it adheres to the system-wide dark mode setting by default. If the user doesn't want dark mode, they'd turn it off system-wide. The site can let the user opt in to dark mode just for that site, but the default is based on the system setting.

[–] Boomkop3@reddthat.com 1 points 4 days ago (3 children)

You didn't actually check, did you?

[–] dan@upvote.au 14 points 4 days ago* (last edited 4 days ago)

Yes, I checked the pull request: https://github.com/nginx/nginx/pull/567/files and I'm also a web developer so I understand how it works.

[–] Kissaki@programming.dev 9 points 4 days ago

Check what? They're right.

[–] dan@upvote.au 11 points 4 days ago

accessibility issues

Respecting the user's choice (whether to use dark mode or not) helps accessibility rather than hindering it.

[–] drkt_@lemmy.dbzer0.com 2 points 4 days ago

They're already more complicated than I want them to be so I'm passing on that

[–] lorty@lemmygrad.ml 7 points 4 days ago

The team's position for rejecting this seems reasonable, but then you look at the actual PR and you see that's one extra line of html on the error pages and I can't help but feel like it wasn't a big deal to accept this.

[–] Kissaki@programming.dev 5 points 4 days ago

Waaaait - I recently implemented a simple dark mode for a simple page and thought color-scheme declares intent/support not influence how it is being rendered. I thought I still had to define dark coloring.

I just checked and to my surprise the browser indeed serves different default/root coloring when dark color scheme is declared [as well]. :O This means I can simplify my CSS.

I must have been misled when skimming by "specifies compatibility" and "Component authors must use the prefers-color-scheme media feature to support the color schemes on the rest of the elements." missing the browser behavior change description.

[–] 30p87@feddit.org 1 points 4 days ago

Honestly, the only person using my sites is me, and I have dark reader anyway lol

[–] dan@upvote.au 2 points 3 days ago

If you want to see this simple change in Nginx, they're running a poll here: https://github.com/nginx/nginx/discussions/584