From 8cc9e57c17571207164d2ab85ab696e54dd4824e Mon Sep 17 00:00:00 2001 From: Theodore Brown Date: Sun, 7 Jun 2026 21:53:59 -0500 Subject: [PATCH 1/2] Avoid wrapping PHP 8.5 release code blocks This improves readability (particularly on smaller screens), since code blocks with overflow can be easily scrolled horizontally to read longer lines, rather than trying to visually parse code with line breaks in unintended places (which can even appear as invalid syntax when a line break is in the middle of a token). --- styles/php85.css | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/styles/php85.css b/styles/php85.css index 6dea02089b..900a1a8ce0 100644 --- a/styles/php85.css +++ b/styles/php85.css @@ -1939,7 +1939,9 @@ header nav { border-color: var(--color-gray-200); background-color: var(--color-white); position: relative; - overflow: hidden + overflow: hidden; + display: flex; + flex-direction: column; } .code-container:where(.dark,.dark *) { @@ -2051,13 +2053,17 @@ header nav { height: calc(var(--spacing) * 4) } +.code-container .phpcode { + flex: 1; + display: flex; + flex-direction: column; +} + .code-container pre { - min-height: 100%; + flex: 1; font-size: var(--text-xs); - line-height: var(--tw-leading, var(--text-xs--line-height)); - --tw-leading: var(--leading-loose); line-height: var(--leading-loose); - white-space: pre-wrap; + white-space: pre; display: flex } @@ -2070,7 +2076,7 @@ header nav { .code-container code { height: 100%; - padding: var(--spacing); + padding: 1.25em; color: var(--color-gray-400); flex: 1; overflow: auto @@ -3550,8 +3556,8 @@ footer p:where(.dark,.dark *) { color: var(--color-gray-400) } -.php85 .phpcode { - padding: 1em; +.php85 .phpcode code { + white-space: revert; } .dark .php85 .phpcode::selection { From 0d9b5330a935a47e9571ac0ee8f2f89ef68c123d Mon Sep 17 00:00:00 2001 From: Theodore Brown Date: Tue, 9 Jun 2026 08:33:59 -0500 Subject: [PATCH 2/2] Allow linking to additional features headings This is possible on the previous release pages, but for some reason wasn't implemented for PHP 8.5. --- releases/8.5/release.inc | 4 ++-- styles/php85.css | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/releases/8.5/release.inc b/releases/8.5/release.inc index 650ad6d05e..05447e3385 100644 --- a/releases/8.5/release.inc +++ b/releases/8.5/release.inc @@ -686,7 +686,7 @@ PHP
-

+

  • @@ -712,7 +712,7 @@ PHP
-

+

  • shell_exec()' diff --git a/styles/php85.css b/styles/php85.css index 900a1a8ce0..1422c8f75c 100644 --- a/styles/php85.css +++ b/styles/php85.css @@ -75,6 +75,7 @@ code[class*=language-], pre[class*=language-] { } .features-title h2, +.release-notes h2, .before-and-after-title-and-description h2 { position: relative; overflow: visible; @@ -82,6 +83,7 @@ code[class*=language-], pre[class*=language-] { } .features-title h2 .genanchor, +.release-notes h2 .genanchor, .before-and-after-title-and-description h2 .genanchor { position: absolute; top: 4px; @@ -97,11 +99,13 @@ code[class*=language-], pre[class*=language-] { } .dark .features-title h2 .genanchor, +.dark .release-notes 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, +.release-notes h2:hover .genanchor, .before-and-after-title-and-description h2:hover .genanchor { display: block; } @@ -2170,7 +2174,6 @@ header nav { } .release-notes ul { - margin-top: calc(var(--spacing) * 6); margin-left: calc(var(--spacing) * 4); list-style-type: disc }