Fix module border showing in the editor when the border setting is off - #8191
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes an editor-only styling issue in the Course Outline Module block where an unbordered module could still render a thick (default “medium” ~3px) border due to an always-present inline border-color style interacting with WordPress core’s :where([style^="border-color"]) rule.
Changes:
- Apply the module wrapper’s inline
borderColorstyle only when the module is actually configured as bordered. - Add a changelog entry documenting the bug fix.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
assets/blocks/course-outline/module-block/module-edit.js |
Conditionally applies inline borderColor only when bordered is true to prevent unintended editor borders. |
changelog/fix-module-border-when-unbordered |
Adds a patch-level “fixed” changelog entry describing the editor border fix. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
The module always applied an inline border-color, so WordPress core's :where([style^="border-color"]) rule forced a solid border with the default medium (3px) width in the editor even when the module border setting was off. Only apply the inline border-color when the module is bordered. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
donnapep
force-pushed
the
fix/module-border-when-unbordered
branch
from
August 22, 2026 17:22
f21da08 to
eb8dae4
Compare
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.
Proposed Changes
In the block editor, a Course Outline module showed a thick (3px) border even when its Border setting was off, while a bordered module correctly showed a thin 1px border. The front end was unaffected.
The module always applied an inline
border-colorto its wrapper. WordPress core's:where([style^="border-color"])rule then forcesborder-style: solid, and with no explicit width the browser falls back to themedium(3px) width — so an unbordered module still rendered a 3px border in the editor. The inlineborder-coloris now applied only when the module is bordered, so the border setting behaves consistently.Screenshots
Testing Instructions
Changelog entry
Changelog Entry Details
Significance
Type
Message
Fix a thick border showing on Course Outline modules in the editor when the module border setting is off.