Repository navigation
Keep Prettier off block markup, and draw the borders it hid - #276
Merged
Merged
Conversation
Core gives a border its solid style only when border-*-color or border-*-width starts a block's style attribute or follows a semicolon. Prettier splits that attribute across lines, so the two footers' top dividers and the sticky header's bottom border never drew on a fresh site. Their style attributes go back to the one line the block editor writes. Prettier now skips templates/ and parts/, and the lint workflow drops its template HTML step, so a reformat cannot hide a border again.
amjadr360
marked this pull request as ready for review
November 16, 2026 04:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When Prettier splits a block's
styleattribute across lines, WordPress stops drawing that block's border. Core only gives a border its solid style whenborder-*-colororborder-*-widthstarts the attribute or follows a semicolon. Since June this has hidden three borders on every fresh site: the top divider of two footers (footer-with-center-logo-and-menu,footer-with-site-description-and-menu) and the bottom line of the sticky header (no-title-sticky-header). This puts those three style attributes back on one line, as the block editor writes them, and stops Prettier from touchingtemplates/andparts/, so the new lint check can't push anyone into the same bug.Screenshots
1. The two footers' top dividers
2. The sticky header's bottom border
PR description generated by Claude.