close
Skip to content

64953 fixed old color in media view - #11409

Closed
OpuRockey wants to merge 6 commits into
WordPress:trunkfrom
OpuRockey:64953-fixed-old-color-in-media-view
Closed

64953 fixed old color in media view#11409
OpuRockey wants to merge 6 commits into
WordPress:trunkfrom
OpuRockey:64953-fixed-old-color-in-media-view

Conversation

@OpuRockey

Copy link
Copy Markdown

Ticket: https://core.trac.wordpress.org/ticket/65001

Description:

This PR updates the color usage in media-view.css to align with the modern WordPress admin color system by replacing hardcoded/legacy color values with standardized admin color variables.

As part of ongoing efforts in WordPress core to reduce color inconsistencies and adopt a unified color palette using CSS custom properties, admin styles are being refactored to use semantic color tokens instead of fixed values.

Changes Made:

  • Replaced legacy color values used in: :hover :focus
  • interactive states and UI elements
  • Updated styles to use: WP admin color variables (e.g. --wp-admin-theme-color, --wp-admin-theme-color-darker-*, etc.)
  • Removed outdated or hardcoded hex values to ensure consistency with the admin color system

Why This Change:

  • Ensures visual consistency across WordPress admin UI
  • Improves maintainability by centralizing color definitions
  • Aligns with WordPress core direction of using CSS custom properties for theming and extensibility
  • Improves compatibility with different admin color schemes and future design updates

Impact:

  • No functional changes
  • Purely visual/style refactor
  • Affects only media-view components in admin
  • Better integration with admin color schemes-

Testing Instructions:

  • Open Media Library (Grid and List view)
  • Hover and focus on: Media items Buttons and controls
  • Verify: Colors match WP admin theme, No regressions in hover/focus states
  • Test across different admin color schemes

Screenshot:

image image

@github-actions

github-actions Bot commented Mar 31, 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 opurockey, huzaifaalmesbah, joedolson, wildworks.

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.

Comment thread src/wp-includes/css/media-views.css Outdated

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

There's an additional color overlooked here, on .media-modal-close:focus, which should also be updated.

@t-hamano

t-hamano commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

@OpuRockey, I believe you have already submitted PR #11375, which is similar to this one. However, let's prioritize this PR. Please apply this feedback from that PR to this one as well.

@OpuRockey

Copy link
Copy Markdown
Author

There's an additional color overlooked here, on .media-modal-close:focus, which should also be updated.

@joedolson , I’ve addressed the requested changes. Let me know if anything else is needed.

@OpuRockey

Copy link
Copy Markdown
Author

@OpuRockey, I believe you have already submitted PR #11375, which is similar to this one. However, let's prioritize this PR. Please apply this feedback from that PR to this one as well.

@t-hamano , All suggested changes have been incorporated. Kindly review again.

image image image image

@t-hamano t-hamano 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.

Thanks for the update!

Overall, it looks good. However, since the original colors #043959 and #135e96 represented a darker color in the old default theme, I believe we should use a darker color as well.

Comment thread src/wp-includes/css/media-views.css Outdated
Comment thread src/wp-includes/css/media-views.css Outdated
Comment thread src/wp-includes/css/media-views.css Outdated
Comment thread src/wp-includes/css/media-views.css Outdated
@OpuRockey

Copy link
Copy Markdown
Author

@t-hamano, Thanks for the suggestions. I’ve applied the changes. Please review.

@t-hamano t-hamano 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.

LGTM!

@t-hamano
t-hamano dismissed joedolson’s stale review April 2, 2026 12:39

I believe all feedback has been addressed.

@github-actions

github-actions Bot commented Apr 2, 2026

Copy link
Copy Markdown

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

SVN changeset: 62199
GitHub commit: d0c6277

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 Apr 2, 2026
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.

4 participants