Skip to content

Fix module border showing in the editor when the border setting is off - #8191

Merged
donnapep merged 2 commits into
trunkfrom
fix/module-border-when-unbordered
Aug 22, 2026
Merged

donnapep merged 2 commits into
trunkfrom
fix/module-border-when-unbordered

Conversation

@donnapep

@donnapep donnapep commented Aug 22, 2026 •

Copy link
Copy Markdown
Member

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-color to its wrapper. WordPress core's :where([style^="border-color"]) rule then forces border-style: solid, and with no explicit width the browser falls back to the medium (3px) width — so an unbordered module still rendered a 3px border in the editor. The inline border-color is now applied only when the module is bordered, so the border setting behaves consistently.

Screenshots

Before After

Testing Instructions

  • Edit a Course, insert a Course Outline, and add a Module with a couple of lessons.
  • Select the Module and turn its Border setting off. Confirm the module no longer shows a thick border in the editor.
  • Turn the Border setting on. Confirm the module shows a single thin 1px border.
  • With the Course Outline block selected, toggle the Border control in the Modules panel and confirm all modules follow the same behavior.
  • View the course/lesson on the front end and confirm module borders render as before.

Changelog entry

  • Automatically create a changelog entry from the details below.
Changelog Entry Details

Significance

  • Patch - Backward-compatible bug fixes

Type

  • Fixed - Fixes a bug

Message

Fix a thick border showing on Course Outline modules in the editor when the module border setting is off.

Copilot AI lite review requested due to automatic review settings August 22, 2026 13:34
@donnapep donnapep added this to the 4.26.4 milestone Aug 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 borderColor style 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.

@github-actions

github-actions Bot commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor

WordPress Playground Preview

The changes in this pull request can previewed and tested using a WordPress Playground instance.

Open WordPress Playground Preview

@donnapep donnapep self-assigned this Aug 22, 2026
donnapep and others added 2 commits August 22, 2026 13:21
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
donnapep force-pushed the fix/module-border-when-unbordered branch from f21da08 to eb8dae4 Compare August 22, 2026 17:22
@donnapep
donnapep merged commit 4f11659 into trunk Aug 22, 2026
21 checks passed
@donnapep
donnapep deleted the fix/module-border-when-unbordered branch August 22, 2026 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants