Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Use color scheme styling for error pages of (builtin) webserver #19496

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
imme-emosol wants to merge 4 commits into php:master
base: master
Choose a base branch
Loading
from imme-emosol:webserver-error-styling

Conversation

Copy link

@imme-emosol imme-emosol commented Aug 16, 2025
edited
Loading

This request asks to
increase support for prefer-color-scheme: dark
by accordingly adding styles to the error pages generated by the builtin webserver.

This seems to be in line with earlier changes,
such as taking larger screens into account (as mentioned in #17956),
and complementing the contrast improvement for the phpinfo page (#8893).

In contrast to earlier changes,
i have removed new lines from the styles used on the error pages,
as that seems to be more in line with the rest of the output.

Another contrast with earlier changes, is
using the css function light-dark1 instead of the prefers-color-scheme used for the phpinfo page.

Aside from that, i have attempted to look for appropriate names for colors and separated the color definitions from the definitions that use them to assign a value to a selector. My hope is that such an approach might ease a future change to a rather consistent coloring scheme within php creations. There seems to be some work done on this, as some styling was moved from ext/standard/info.c to ext/standard/css.c.

On the matter of preferred color schemes, i would like to point out that defaulting to emitting less light to screen viewers seems preferable to bombarding them with light. In other words, it seems to me that being 'lost in the dark' is preferable to being 'blinded by the light'. Hopefully this will be picked up 'en masse' and lead to a default of screens emitting less radiation when a piece of software displays its initial screen.

Visuals

Some (lousy) cropped screenshots.

Current current
New - light (probably default for many people) new - light
New - dark new - dark

TL;DR:

Remember Manfred Mann 2

edit: Added visuals section

Footnotes

  1. https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/light-dark

  2. As is (hopefully widely) known, Manfred Mann's Earth Band was 'blinded by the light'.
    In short, my question to everyone working with web pages, is to remember that such a thing can happen.

Copy link
Author

Oh, forgot to mention for context :
update css for 404 pages to not look like we are in 1995 and have a cons... #240
Update css for 404 pages to feel more up to date and have a consistent layout across browsers #260

Copy link
Member

bukka commented Aug 16, 2025

The test failure related and you won't likely get full consensus here so it needs RFC.

imme-emosol reacted with thumbs up emoji

Copy link
Author

imme-emosol commented Aug 16, 2025
edited
Loading

Okay, i did not actually think it would be considered a new feature.

Unfortunately getting acquainted with the RFC process will be too much to handle for me right now.
As such, i will 'resolve' this by closing the pull request.

edit: Thank you for the clear reply!

Copy link
Member

bukka commented Aug 16, 2025

I personally don't mind this change but everyone has got their own preferences and I just don't feel I can make the decision to merge this without an approval from other. Hence the RFC request.

Copy link

I do not see a reason to persue an RFC for this. It is just for error pages and if the style changes just aligns the CLI web server with that of phpinfo(), then I think a simple agreement here is just fine. If we were to overhaul all of the visual code PHP produces then I could see the argument for a longer discussion for strategy but I don't think it is needed for a case like this

imme-emosol reacted with thumbs up emoji

Copy link
Member

bukka commented Aug 16, 2025

Oh it sounded to me like it's changing default from light to dark but I don't really know much about CSS and don't really care much either so if anyone thinks that it's non controversial, I don't really mind.

imme-emosol reacted with laugh emoji

Copy link
Member

bukka commented Aug 16, 2025

I removed the RFC request and delagating to someone who knows CSS to make that decision :)

imme-emosol reacted with thumbs up emoji

@bukka bukka removed their request for review August 16, 2025 10:34
Copy link
Member

@imme-emosol I suggest to add screenshots to the PR description.

imme-emosol reacted with thumbs up emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /