Skip to content

Conversation

@ElfSundae
Copy link

This pull request fixes the missing padding in example code blocks introduced by changes in PHP 8.3+.
Since highlight_string() now returns <pre><code>...</code></pre> instead of <code>...</code>, the existing CSS rule targeting only <code> no longer applied.

截屏2025-10-09 19 46 40

The fix adds <pre> to the selector so both cases are covered:

+.docs .example-contents > .phpcode > pre,
 .docs .example-contents > .phpcode > code {
     padding: .75rem;
 }

This ensures that the padding style is correctly applied to all example code blocks.

@github-actions
Copy link
Contributor

🚀 Regression report for commit 9799963 is at https://web-php-regression-report-pr-1501.preview.thephp.foundation

@github-actions
Copy link
Contributor

🚀 Preview for commit 9799963 can be found at https://web-php-pr-1501.preview.thephp.foundation

overflow-x: auto;
}

.docs .example-contents > .phpcode > pre,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.docs .example-contents > .phpcode > pre,
.docs .example-contents > .phpcode > pre > code,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants