From d6894969b3d40f093dce25123d9e3eb5ac5f949a Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Wed, 19 Nov 2025 19:23:00 +0300 Subject: [PATCH 1/5] Use server-side highlight --- releases/8.5/common.php | 3 +- releases/8.5/release.inc | 218 +++++++++++++++++++++++++++++---------- styles/php85.css | 103 +++++------------- 3 files changed, 189 insertions(+), 135 deletions(-) diff --git a/releases/8.5/common.php b/releases/8.5/common.php index 0572de6319..2bad51cd69 100644 --- a/releases/8.5/common.php +++ b/releases/8.5/common.php @@ -25,8 +25,7 @@ function common_header(string $description): void { \site_header("PHP 8.5 Release Announcement", [ 'current' => 'php85', - 'css' => ['prism.css', 'php85.css'], - 'js_files' => ['js/ext/prism.js'], + 'css' => ['php85.css'], 'language_switcher' => $languages, 'theme_switcher' => true, 'meta_tags' => << + -
-
+                    
-                    
+PHP + ); ?>
@@ -224,17 +230,23 @@ var_dump($components['host']); RFC
+ -
-
+                    getHost());
 // string(7) "php.net"
-
-                    
+PHP + ); ?> @@ -254,9 +266,15 @@ var_dump($uri->getHost());
+ -
-
+                    
-                    
+PHP + ); ?>
@@ -280,9 +298,15 @@ var_dump($slug); RFC
+ -
-
+                    
-                    
+PHP + ); ?> @@ -314,9 +338,15 @@ var_dump($slug);
+ -
-
+                    withAlpha(128);
-
-                    
+PHP + ); ?>
@@ -348,9 +378,15 @@ $transparentBlue = $blue->withAlpha(128); RFC
+ -
-
+                    withAlpha(128);
-
-                    
+PHP + ); ?> @@ -391,17 +427,23 @@ $transparentBlue = $blue->withAlpha(128);
+ -
-
+                    
-                    
+PHP + ); ?>
@@ -412,9 +454,15 @@ getPhpVersion(); // No warning RFC
+ -
-
+                    
-                    
+PHP + ); ?> @@ -445,9 +493,15 @@ getPhpVersion();
+ -
-
+                    
-                    
+PHP + ); ?>
@@ -472,9 +526,15 @@ final class PostsController RFC RFC
+ -
-
+                    
-                    
+PHP + ); ?> @@ -511,9 +571,15 @@ final class PostsController
+ -
-
+                    
-                    
+PHP + ); ?>
@@ -535,9 +601,15 @@ curl_exec($ch); RFC
+ -
-
+                    
-                    
+PHP + ); ?> @@ -569,14 +641,20 @@ curl_exec($ch);
+ -
-
+                    
-                    
+PHP + ); ?>
@@ -586,12 +664,18 @@ $lastEvent = $events === [] RFC
+ -
-
+                    
-                    
+PHP + ); ?> @@ -793,7 +877,27 @@ $lastEvent = array_last($events); Date: Wed, 19 Nov 2025 19:26:24 +0300 Subject: [PATCH 2/5] Fix anchor in light mode --- styles/php85.css | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/styles/php85.css b/styles/php85.css index 6afa27bdfd..8dd0231e05 100644 --- a/styles/php85.css +++ b/styles/php85.css @@ -85,12 +85,17 @@ code[class*=language-], pre[class*=language-] { margin-left: -30px; height: 30px; width: 30px; - background: url("/images/php8/anchor-white.svg") scroll no-repeat left center / 21px 16px transparent; + background: url("/images/php8/anchor.svg") scroll no-repeat left center / 21px 16px transparent; text-decoration: none; border-bottom: none; font-size: 0; } +.dark .features-title h2 .genanchor, +.dark .before-and-after-title-and-description h2 .genanchor { + background: url("/images/php8/anchor-white.svg") scroll no-repeat left center / 21px 16px transparent; +} + .features-title h2:hover .genanchor, .before-and-after-title-and-description h2:hover .genanchor { display: block; From 5c1286c570e21a991be7c07dfee8472549543302 Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Wed, 19 Nov 2025 19:39:50 +0300 Subject: [PATCH 3/5] Update code selection for dark mode --- styles/php85.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/styles/php85.css b/styles/php85.css index 8dd0231e05..90665d74ee 100644 --- a/styles/php85.css +++ b/styles/php85.css @@ -3549,6 +3549,10 @@ footer p:where(.dark,.dark *) { padding: 1em; } +.dark .php85 .phpcode::selection { + background-color: #333; +} + .php85 .phpcode span.comment { color: #708090; background-color: transparent; From d1082d5cc8ef3551dc324c973ea224f93913e28f Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Wed, 19 Nov 2025 19:49:41 +0300 Subject: [PATCH 4/5] Update code colors for light mode --- styles/php85.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/styles/php85.css b/styles/php85.css index 90665d74ee..5583af06df 100644 --- a/styles/php85.css +++ b/styles/php85.css @@ -3560,7 +3560,7 @@ footer p:where(.dark,.dark *) { } .php85 .phpcode span.default { - color: #dd4a68; + color: rgb(213, 51, 84); background-color: transparent; } @@ -3570,7 +3570,7 @@ footer p:where(.dark,.dark *) { } .php85 .phpcode span.string { - color: #690; + color: rgb(80, 119, 0); background-color: transparent; } From 6f8a2ced563670115dce5b55f1676d35599eec7c Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Wed, 19 Nov 2025 19:51:19 +0300 Subject: [PATCH 5/5] Update code colors for light mode --- styles/php85.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/styles/php85.css b/styles/php85.css index 5583af06df..d8523e91aa 100644 --- a/styles/php85.css +++ b/styles/php85.css @@ -1132,7 +1132,7 @@ header nav { .hero-badge { margin-bottom: calc(var(--spacing) * 6); background-color: #ffffffa6; - border-radius: 3.40282e38px; + border-radius: calc(infinity * 1px); align-items: center; display: inline-flex } @@ -3606,7 +3606,7 @@ footer p:where(.dark,.dark *) { font-weight: var(--font-weight-semibold); color: var(--color-white); background-color: #6b58ff; - border-radius: 3.40282e38px; + border-radius: calc(infinity * 1px); justify-content: center; align-items: center; text-decoration-line: none; @@ -3654,7 +3654,7 @@ footer p:where(.dark,.dark *) { --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor); box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); --tw-ring-color: color-mix(in oklab, var(--color-gray-200) 50%, transparent); - border-radius: 3.40282e38px; + border-radius: calc(infinity * 1px); justify-content: center; align-items: center; text-decoration-line: none;