Make WordPress Core


Ignore:
Timestamp:
01/13/2026 10:07:57 PM (2 months ago)
Author:
peterwilsoncc
Message:

General: Use legacy content properties for CSS icons.

In modern browsers the CSS content property provides alt text support for assistive technology in the form display / alt text. This introduces support for legacy browsers that do not support the new syntax.

CSS content properties take advantage of the CSS cascade and browsers ignoring values they don't understand by adding duplicate content properties in the form:

content: display;
content: display / alt text;

Modern browsers will use the second property, legacy browsers will use the first.

Follow-up to [60885] for #63603.

Props acmoifr, joedolson, jorbin, mydesign78, ov3rfly, peterwilsoncc, presskopp, sabernhardt, siliconforks, swissspidy, threadi, wildworks, wolf45.
Fixes #64350.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/common.css

    r60885 r61480  
    560560
    561561.js-update-details-toggle[aria-expanded="true"] .dashicons::before {
     562    content: "\f142";
    562563    content: "\f142" / '';
    563564}
     
    806807    background: none;
    807808    color: #787c82;
     809    content: "\f153";
    808810    content: "\f153" / '';
    809811    display: block;
     
    11331135
    11341136.wp-filter .drawer-toggle:before {
     1137    content: "\f111";
    11351138    content: "\f111" / '';
    11361139    margin: 0 5px 0 0;
     
    15251528#plugin-information-footer .update-now:not(.button-disabled):before {
    15261529    color: #d63638;
     1530    content: "\f463";
    15271531    content: "\f463" / '';
    15281532    display: inline-block;
     
    15871591.button.activating-message:before {
    15881592    color: #d63638;
     1593    content: "\f463";
    15891594    content: "\f463" / '';
    15901595}
     
    16231628.button.activated-message:before {
    16241629    color: #68de7c;
     1630    content: "\f147";
    16251631    content: "\f147" / '';
    16261632}
     
    16291635.update-message.notice-error p:before {
    16301636    color: #d63638;
     1637    content: "\f534";
    16311638    content: "\f534" / '';
    16321639}
     
    18381845#screen-meta-links .show-settings:after {
    18391846    right: 0;
     1847    content: "\f140";
    18401848    content: "\f140" / '';
    18411849    font: normal 20px/1 dashicons;
     
    18511859
    18521860#screen-meta-links .screen-meta-active:after {
     1861    content: "\f142";
    18531862    content: "\f142" / '';
    18541863}
     
    26722681
    26732682.star-rating .star-full:before {
     2683    content: "\f155";
    26742684    content: "\f155" / '';
    26752685}
    26762686
    26772687.star-rating .star-half:before {
     2688    content: "\f459";
    26782689    content: "\f459" / '';
    26792690}
     
    26842695
    26852696.star-rating .star-empty:before {
     2697    content: "\f154";
    26862698    content: "\f154" / '';
    26872699}
     
    31753187
    31763188.plugin-details-modal #TB_closeWindowButton:after {
     3189    content: "\f335";
    31773190    content: "\f335" / '';
    31783191    font: normal 32px/29px 'dashicons';
     
    32013214.bulk-action-notice .toggle-indicator::before,
    32023215.privacy-text-box .toggle-indicator::before {
     3216    content: "\f142";
    32033217    content: "\f142" / '';
    32043218    display: inline-block;
     
    32133227.bulk-action-notice .bulk-action-errors-collapsed .toggle-indicator::before,
    32143228.privacy-text-box.closed .toggle-indicator::before {
     3229    content: "\f140";
    32153230    content: "\f140" / '';
    32163231}
    32173232
    32183233.postbox .handle-order-higher .order-higher-indicator::before {
     3234    content: "\f343";
    32193235    content: "\f343" / '';
    32203236    color: inherit;
     
    32223238
    32233239.postbox .handle-order-lower .order-lower-indicator::before {
     3240    content: "\f347";
    32243241    content: "\f347" / '';
    32253242    color: inherit;
     
    33453362}
    33463363[role="treeitem"][aria-expanded="false"] > .folder-label .icon:after {
     3364    content: "\f139";
    33473365    content: "\f139" / '';
    33483366}
    33493367[role="treeitem"][aria-expanded="true"] > .folder-label .icon:after {
     3368    content: "\f140";
    33503369    content: "\f140" / '';
    33513370}
     
    35633582.wp-customizer .accordion-section-title:after,
    35643583.widget-top .widget-action .toggle-indicator:before {
     3584    content: "\f140";
    35653585    content: "\f140" / '';
    35663586    font: normal 20px/1 dashicons;
     
    36113631.widget.open .widget-top .widget-action .toggle-indicator:before,
    36123632.widget.widget-in-question .widget-top .widget-action .toggle-indicator:before {
     3633    content: "\f142";
    36133634    content: "\f142" / '';
    36143635}
Note: See TracChangeset for help on using the changeset viewer.