Skip to content

Fix the dotted border in RTL for the Format Link pattern - #260

Merged
MaggieCabrera merged 2 commits into
WordPress:trunkfrom
Goudarz:fix/rtl-format-link-border
Nov 30, 2026
Merged

MaggieCabrera merged 2 commits into
WordPress:trunkfrom
Goudarz:fix/rtl-format-link-border

Conversation

@Goudarz

@Goudarz Goudarz commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Description

The link on a Persian website begins on the right, but its dotted border remains on the left. This modification causes the border to follow the direction of the text. In English, it remains on the left; in Persian, it shifts to the right.

Screenshots
On a Persian website, both screenshots display the same pattern.

Before After
Before After

Testing Instructions

  1. Add a new Format Link pattern to a post and set the site language to Persian.
  2. Examine the published post and the editor. There should be a single dotted border on the right side of the link.
  3. Switch the site language to English and reload the post. The dotted border should appear on the left.
  4. Reopen the post after saving it. There shouldn't be a block validation warning when the pattern opens.

@github-actions github-actions Bot added the First-time Contributor Pull request opened by a first-time contributor to the repository label Nov 29, 2026
@github-actions

Copy link
Copy Markdown

👋 Thanks for your first pull request, @Goudarz! We'll take a look soon.

@github-actions github-actions Bot added [Area] Global Styles Issues or PRs that touch theme.json or the base stylesheet. [Area] Patterns Issues or PRs that touch the theme's block patterns. and removed First-time Contributor Pull request opened by a first-time contributor to the repository labels Nov 29, 2026
@github-actions

github-actions Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: Goudarz <goudarz@git.wordpress.org>
Co-authored-by: MaggieCabrera <onemaggie@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub or WordPress.org user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

Move the direction-aware border out of style.css and into a Group block
style in styles/blocks, so the pattern needs no custom class.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@github-actions github-actions Bot added documentation Improvements or additions to documentation and removed [Area] Global Styles Issues or PRs that touch theme.json or the base stylesheet. labels Nov 30, 2026

@MaggieCabrera MaggieCabrera 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.

I made this into a block style so people can turn it off/on

@MaggieCabrera
MaggieCabrera merged commit 2e54a84 into WordPress:trunk Nov 30, 2026
6 checks passed
@MaggieCabrera

MaggieCabrera commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

@juanfra I merged this but it includes a new string: the title of the block style. Should I remove the blocks/.json file and leave it as a class for now?
/cc @peterwilsoncc

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

Labels

[Area] Patterns Issues or PRs that touch the theme's block patterns. documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants