Skip to content

Administration: Remove the obsolete ::-moz-focus-inner rules - #14213

Closed
irozum wants to merge 3 commits into
WordPress:trunkfrom
irozum:fix/41580-simplify-moz-focus-inner
Closed

irozum wants to merge 3 commits into
WordPress:trunkfrom
irozum:fix/41580-simplify-moz-focus-inner

Conversation

@irozum

@irozum irozum commented Oct 12, 2026 •

Copy link
Copy Markdown

Summary

What: Removes the ::-moz-focus-inner rules from buttons.css and editor.css entirely.

Why:

  • The rules were added to remove the extra padding Firefox used to add to buttons, and the dotted inner focus border on Windows.
  • Firefox 53 dropped the extra padding, and ::-moz-focus-inner itself has since been removed from Firefox on every platform.
  • MDN's browser-compat-data dropped the selector in Remove obsolete -moz-image-region and -moz-focus-inner mdn/browser-compat-data#27467 (August 2025) as "removed from all browsers for more than two years".
  • The rules no longer match anything, so they're dead CSS.

Not changed:

  • jquery-ui-dialog.css is third-party, left untouched per the feedback on the ticket.
  • The bundled themes (Twenty Thirteen through Twenty Twenty-One) also carry ::-moz-focus-inner rules. They belong to the Bundled Themes component and are better handled in a separate ticket.

Trac ticket: https://core.trac.wordpress.org/ticket/41580

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Sonnet 5.5, Claude Opus 5.5
Used for: Implementation, browser-compatibility research, and PR description. Reviewed by Igor Rozum.


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@github-actions

github-actions Bot commented Oct 12, 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. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props irozum, afercia.

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

@github-actions

Copy link
Copy Markdown

Test using WordPress Playground

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

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

@afercia

afercia commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

@irozum thanks for the PR.
Can you please detail any reference that states that Firefox for Windows still uses ::-moz-focus-inner?
To my understanding, it si deprecated and not used any lonver, not even on Windows:
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/::-moz-focus-inner

@irozum irozum changed the title Administration: Simplify the ::-moz-focus-inner button CSS fix Administration: Remove the obsolete ::-moz-focus-inner rules Oct 13, 2026
@irozum

irozum commented Oct 13, 2026

Copy link
Copy Markdown
Author

Thanks @afercia, you're right. That line came from the 2017 ticket description and is no longer accurate. MDN's browser-compat-data removed ::-moz-focus-inner in mdn/browser-compat-data#27467 (Aug 2025) as "removed from all browsers for more than two years", so it doesn't match anything in current Firefox on any platform.

I've updated the PR to remove the ::-moz-focus-inner rules from buttons.css and editor.css entirely instead of simplifying them. Third-party jquery-ui-dialog.css is left untouched, as you suggested on the ticket. The bundled themes also still have these rules, but I think they're better handled in a separate ticket for the Bundled Themes component. Happy to open one if that's useful.

@afercia

afercia commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Thank you @irozum for confirming.
I'd agree the Bundled Themes should be handled in a separate ticket, please do feel free to create one!

@afercia

afercia commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

I pushed a commit to remove ::-moz-focus-inner from wp-includes/css/jquery-ui-dialog.css.

The filename may be misleading but jquery-ui-dialog.css is a custom file in Core that has been updated several times.

@afercia afercia added the props-bot Adding this label triggers the Props Bot workflow for a PR. label Oct 13, 2026
@github-actions github-actions Bot removed the props-bot Adding this label triggers the Props Bot workflow for a PR. label Oct 13, 2026
wporg-sync pushed a commit that referenced this pull request Oct 13, 2026
…-inner pseudo-element from Core files.

As of August 2025, the `::-moz-focus-inner` CSS pseudo-element has been removed from any Firefox implementation on any platform. Targeting this pseudo element doesn't do anything any longer.
Bundled themes will be handled separately.

Developed in #14213

Props irozum, ViktorFroberg, DrewAPicture, callumbw95, afercia.
Fixes #41580.


git-svn-id: https://develop.svn.wordpress.org/trunk@64333 602fd350-edb4-49c9-b593-d223f7449a82
@github-actions

Copy link
Copy Markdown

A commit was made that fixes the Trac ticket referenced in the description of this pull request.

SVN changeset: 64333
GitHub commit: 34ecb33

This PR will be closed, but please confirm the accuracy of this and reopen if there is more work to be done.

@github-actions github-actions Bot closed this Oct 13, 2026
wporg-sync pushed a commit to WordPress/WordPress that referenced this pull request Oct 13, 2026
…-inner pseudo-element from Core files.

As of August 2025, the `::-moz-focus-inner` CSS pseudo-element has been removed from any Firefox implementation on any platform. Targeting this pseudo element doesn't do anything any longer.
Bundled themes will be handled separately.

Developed in WordPress/wordpress-develop#14213

Props irozum, ViktorFroberg, DrewAPicture, callumbw95, afercia.
Fixes #41580.

Built from https://develop.svn.wordpress.org/trunk@64333


git-svn-id: http://core.svn.wordpress.org/trunk@63483 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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