Make WordPress Core

Changeset 61940


Ignore:
Timestamp:
03/11/2026 03:38:49 PM (2 months ago)
Author:
joedolson
Message:

Admin: Fix checked input state in older browsers.

Remove duplicate CSS setting the checked state for checkbox and radio inputs from _admin.scss. The duplicate selectors overrode the white checkmark in older browsers, impacting alternate color schemes.

Props sabernhardt, joedolson.
Fixes #64822.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/colors/_admin.scss

    r61645 r61940  
    8989}
    9090
    91 input[type=checkbox]:checked::before {
    92     content: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.83%204.89l1.34.94-5.81%208.38H9.02L5.78%209.67l1.34-1.25%202.57%202.4z%27%20fill%3D%27#{url-friendly-colour(variables.$form-checked)}%27%2F%3E%3C%2Fsvg%3E");
    93     content: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.83%204.89l1.34.94-5.81%208.38H9.02L5.78%209.67l1.34-1.25%202.57%202.4z%27%20fill%3D%27#{url-friendly-colour(variables.$form-checked)}%27%2F%3E%3C%2Fsvg%3E") / '';
    94 }
    95 
    96 // Checkbox checkmark - white for visibility on theme color background
    97 input[type="checkbox"]:checked::before {
    98     content: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.83%204.89l1.34.94-5.81%208.38H9.02L5.78%209.67l1.34-1.25%202.57%202.4z%27%20fill%3D%27%23ffffff%27%2F%3E%3C%2Fsvg%3E") / '';
    99 }
    100 
    10191// Radio checked state - uses theme color
    10292input[type="radio"]:checked {
    10393    background: var(--wp-admin-theme-color);
    10494    border-color: var(--wp-admin-theme-color);
    105 }
    106 
    107 // Radio dot - white for visibility on theme color background
    108 input[type="radio"]:checked::before {
    109     background: tokens.$white;
    11095}
    11196
Note: See TracChangeset for help on using the changeset viewer.