Opened 3 weeks ago
Closed 2 days ago
#64840 closed defect (bug) (fixed)
Admin Color Scheme Not Applied in Media Modal Inside Elementor Editor
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 7.0 | Priority: | normal |
| Severity: | normal | Version: | trunk |
| Component: | General | Keywords: | admin-reskin has-patch commit dev-reviewed |
| Focuses: | css | Cc: |
Description
When opening the WordPress Media Library from the Elementor editor (e.g., using the Image widget), the 'Select Files', 'Select' and other button and link do not use the admin color scheme.
The admin color scheme CSS variables are not loaded in the Elementor editor context, so the button colors not display the correct admin color scheme. This results in inconsistent UI compared to the standard WordPress Media Library in the admin dashboard.
Steps to Reproduce:
- Go to Pages → Add New
- Click Edit with Elementor
- Add an Image widget
- Click Choose Image
- The Media Library modal opens
- Check the “Select Files” or “Select” button
Expected Result:
Media Library should use the admin color scheme.
Environment
- WordPress: 7.0-beta4-61919-src
- PHP: 8.3.30
- Server: nginx/1.29.6
- Database: mysqli (Server: 8.4.8 / Client: mysqlnd 8.3.30)
- Browser: Chrome 145.0.0.0
- OS: macOS
- Theme: Twenty Twenty-Five 1.4
- MU Plugins: None activated
- Plugins:
- Elementor 3.35.6
- Test Reports 1.2.1
Attachments (2)
Change History (16)
#1
@
2 weeks ago
- Keywords close admin-reskin added
- Milestone changed from Awaiting Review to 7.0
- Version set to trunk
#2
@
12 days ago
The reason is that the CSS variables are not being output in the Elementor editor, but I think this ticket appears to point to a more underlying core issue.
The new Admin color is based on CSS variables, which are enqueued by wp-base-styles. Therefore, the new Admin color shouldn't work on screens where wp-base-styles isn't enqueued.
I'm not sure why these CSS variables aren't being output in the Elementor editor, but it might be dequeuing core CSS in some way.
It might be worth reviewing the wp_default_styles() function to see if there are any other places where wp-base-styles should be added as a dependency.
#3
@
11 days ago
- Focuses css added
- Keywords needs-patch added; close removed
Enqueuing wp-base-styles is not enough because that still relies on a body class. Stylesheets in the wp-includes directory should have default values for each CSS custom property. [61652] added default values for colors and width in focus outlines, but at least buttons.css and a few rules in media-views.css still need fallbacks (such as what they were before [61645]).
#4
follow-up:
↓ 7
@
11 days ago
I noticed that we have a mix of CSS custom properties that have fallback values and those that don't.
var(--wp-admin-theme-color, #3858e9); var(--wp-admin-theme-color);
Perhaps all we need to do is add fallback values to all CSS custom properties?
This ticket was mentioned in PR #11301 on WordPress/wordpress-develop by @wildworks.
10 days ago
#5
- Keywords has-patch added; needs-patch removed
Trac ticket: https://core.trac.wordpress.org/ticket/64840
## Use of AI Tools
All code changes were made by Copilot, and I have verified that all changes are correct.
## Testing instructions
One way to test this PR is to use Elementor. Elementor uses media modals on screens that are not enqueuing CSS custom properties.
- Install Elementor
- Open http://localhost:8889/wp-admin/post-new.php
- Click the " Edit with Elementor" button (If it's not enabled)
- Click the Image button inside the left sidebar
- Click the "Choose Image" button
- Confirm the button colors
## Screenshot
| Before | After |
|---|---|
| | |
| | |
@shailu25 commented on PR #11301:
9 days ago
#6
#7
in reply to:
↑ 4
;
follow-up:
↓ 8
@
6 days ago
Replying to wildworks:
I noticed that we have a mix of CSS custom properties that have fallback values and those that don't.
var(--wp-admin-theme-color, #3858e9); var(--wp-admin-theme-color);Perhaps all we need to do is add fallback values to all CSS custom properties?
In which cases we don;t have var(--wp-admin-theme-color) defined?
#8
in reply to:
↑ 7
@
6 days ago
Replying to mukesh27:
Replying to wildworks:
I noticed that we have a mix of CSS custom properties that have fallback values and those that don't.
var(--wp-admin-theme-color, #3858e9); var(--wp-admin-theme-color);Perhaps all we need to do is add fallback values to all CSS custom properties?
In which cases we don;t have
var(--wp-admin-theme-color)defined?
This is the case when wp-base-styles is not enqueued.
This ticket was mentioned in Slack in #core by mukeshpanchal27. View the logs.
4 days ago
#11
@
3 days ago
Test Report
Patch tested: https://github.com/WordPress/wordpress-develop/pull/11301
Environment
- WordPress: 7.0-beta6-20260322.085519
- PHP: 7.4.33
- Server: PHP.wasm
- Database: WP_SQLite_Driver (Server: 8.0.38 / Client: 3.51.0)
- Browser: Chrome 146.0.0.0
- OS: Windows 10/11
- Theme: Twenty Twenty-Five 1.4
- MU Plugins: None activated
- Plugins:
- Elementor 3.35.9
- Test Reports 1.2.1
Actual Results
- ✅ Issue resolved with patch.
| Before | After |
|
|
#12
@
2 days ago
- Keywords commit dev-feedback added
Marking for commit; needs 2nd committer sign off before commit.


This looks like an issue on Elementor side, not Core. Probably better to raise the issue on their support forums.
I tested inserting a media from the Legacy/Classic Editor and it does have the new design.