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/themes.css

    r60975 r61480  
    305305    border-radius: 50%;
    306306    display: inline-block;
     307    content: "\f132";
    307308    content: "\f132" / '';
    308309    -webkit-font-smoothing: antialiased;
     
    409410    color: #787c82;
    410411    display: inline-block;
     412    content: "\f335";
    411413    content: "\f335" / '';
    412414    font-weight: 300;
     
    468470
    469471.theme-overlay .theme-header .left:before {
     472    content: "\f341";
    470473    content: "\f341" / '';
    471474}
    472475
    473476.theme-overlay .theme-header .right:before {
     477    content: "\f345";
    474478    content: "\f345" / '';
    475479}
     
    10231027.theme-browser .theme .notice-success p:before {
    10241028    color: #68de7c;
     1029    content: "\f147";
    10251030    content: "\f147" / '';
    10261031    display: inline-block;
     
    15181523.theme-install-overlay .close-full-overlay:before {
    15191524    font: normal 22px/1 dashicons;
     1525    content: "\f335";
    15201526    content: "\f335" / '';
    15211527    position: relative;
     
    15261532.theme-install-overlay .previous-theme:before {
    15271533    font: normal 20px/1 dashicons;
     1534    content: "\f341";
    15281535    content: "\f341" / '';
    15291536    position: relative;
     
    15341541.theme-install-overlay .next-theme:before {
    15351542    font: normal 20px/1 dashicons;
     1543    content: "\f345";
    15361544    content: "\f345" / '';
    15371545    position: relative;
     
    16201628.wp-full-overlay .collapse-sidebar-arrow:before {
    16211629    display: block;
     1630    content: "\f148";
    16221631    content: "\f148" / '';
    16231632    background: #f0f0f1;
     
    17411750
    17421751.wp-full-overlay-footer .devices .preview-desktop:before {
     1752    content: "\f472";
    17431753    content: "\f472" / '';
    17441754}
    17451755
    17461756.wp-full-overlay-footer .devices .preview-tablet:before {
     1757    content: "\f471";
    17471758    content: "\f471" / '';
    17481759}
    17491760
    17501761.wp-full-overlay-footer .devices .preview-mobile:before {
     1762    content: "\f470";
    17511763    content: "\f470" / '';
    17521764}
Note: See TracChangeset for help on using the changeset viewer.