Skip to content

Commit 35a01f8

Browse files
authored
Add dark mode for phpinfo() (#7626)
The light mode remains the same.
1 parent 8be10fb commit 35a01f8

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

ext/standard/css.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ PHPAPI ZEND_COLD void php_info_print_css(void) /* {{{ */
2323
PUTS("pre {margin: 0; font-family: monospace;}\n");
2424
PUTS("a:link {color: #009; text-decoration: none; background-color: #fff;}\n");
2525
PUTS("a:hover {text-decoration: underline;}\n");
26-
PUTS("table {border-collapse: collapse; border: 0; width: 934px; box-shadow: 1px 2px 3px #ccc;}\n");
26+
PUTS("table {border-collapse: collapse; border: 0; width: 934px; box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.2);}\n");
2727
PUTS(".center {text-align: center;}\n");
2828
PUTS(".center table {margin: 1em auto; text-align: left;}\n");
2929
PUTS(".center th {text-align: center !important;}\n");
@@ -38,5 +38,13 @@ PHPAPI ZEND_COLD void php_info_print_css(void) /* {{{ */
3838
PUTS(".v i {color: #999;}\n");
3939
PUTS("img {float: right; border: 0;}\n");
4040
PUTS("hr {width: 934px; background-color: #ccc; border: 0; height: 1px;}\n");
41+
PUTS("@media (prefers-color-scheme: dark) {\n");
42+
PUTS(" body {background-color: #333; color: #ddd;}\n");
43+
PUTS(" td, th {border-color: #777;}\n");
44+
PUTS(" .e {background-color: #4F5B93;}\n");
45+
PUTS(" .h {background-color: #5b69a6;}\n");
46+
PUTS(" .v {background-color: #444;}\n");
47+
PUTS(" hr {background-color: #777;}\n");
48+
PUTS("}\n");
4149
}
4250
/* }}} */

0 commit comments

Comments
 (0)