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

    r60885 r61480  
    353353.welcome-panel .welcome-write-blog:before,
    354354.welcome-panel .welcome-edit-page:before {
     355    content: "\f119";
    355356    content: "\f119" / '';
    356357    top: -3px;
     
    359360/* @deprecated 5.9.0 -- Icons removed from welcome panel. */
    360361.welcome-panel .welcome-add-page:before {
     362    content: "\f132";
    361363    content: "\f132" / '';
    362364    top: -1px;
     
    365367/* @deprecated 5.9.0 -- Icons removed from welcome panel. */
    366368.welcome-panel .welcome-setup-home:before {
     369    content: "\f102";
    367370    content: "\f102" / '';
    368371    top: -1px;
     
    371374/* @deprecated 5.9.0 -- Icons removed from welcome panel. */
    372375.welcome-panel .welcome-view-site:before {
     376    content: "\f115";
    373377    content: "\f115" / '';
    374378    top: -2px;
     
    377381/* @deprecated 5.9.0 -- Icons removed from welcome panel. */
    378382.welcome-panel .welcome-widgets-menus:before {
     383    content: "\f116";
    379384    content: "\f116" / '';
    380385    top: -2px;
     
    383388/* @deprecated 5.9.0 -- Icons removed from welcome panel. */
    384389.welcome-panel .welcome-widgets:before {
     390    content: "\f538";
    385391    content: "\f538" / '';
    386392    top: -2px;
     
    389395/* @deprecated 5.9.0 -- Icons removed from welcome panel. */
    390396.welcome-panel .welcome-menus:before {
     397    content: "\f163";
    391398    content: "\f163" / '';
    392399    top: -2px;
     
    395402/* @deprecated 5.9.0 -- Icons removed from welcome panel. */
    396403.welcome-panel .welcome-comments:before {
     404    content: "\f117";
    397405    content: "\f117" / '';
    398406    top: -1px;
     
    401409/* @deprecated 5.9.0 -- Icons removed from welcome panel. */
    402410.welcome-panel .welcome-learn-more:before {
     411    content: "\f118";
    403412    content: "\f118" / '';
    404413    top: -1px;
     
    410419#dashboard_right_now li a:before,
    411420#dashboard_right_now li > span:before { /* get only the first level span to exclude screen-reader-text in mu-storage */
    412     content: "\f159" / ''; /* generic icon for items added by CPTs ? */
    413421    padding: 0 5px 0 0;
     422    /* generic icon for items added by CPTs ? */
     423    content: "\f159";
     424    content: "\f159" / '';
    414425}
    415426
    416427#dashboard_right_now .page-count a:before,
    417428#dashboard_right_now .page-count span:before {
     429    content: "\f105";
    418430    content: "\f105" / '';
    419431}
     
    421433#dashboard_right_now .post-count a:before,
    422434#dashboard_right_now .post-count span:before {
     435    content: "\f109";
    423436    content: "\f109" / '';
    424437}
    425438
    426439#dashboard_right_now .comment-count a:before {
     440    content: "\f101";
    427441    content: "\f101" / '';
    428442}
    429443
    430444#dashboard_right_now .comment-mod-count a:before {
     445    content: "\f125";
    431446    content: "\f125" / '';
    432447}
    433448
    434449#dashboard_right_now .storage-count a:before {
     450    content: "\f104";
    435451    content: "\f104" / '';
    436452}
    437453
    438454#dashboard_right_now .storage-count.warning a:before {
     455    content: "\f153";
    439456    content: "\f153" / '';
    440457}
    441458
    442459#dashboard_right_now .search-engines-info:before {
     460    content: "\f348";
    443461    content: "\f348" / '';
    444462    color: #d63638;
     
    560578
    561579.community-events .ce-separator::before {
     580    content: "\2022";
    562581    content: "\2022" / '';
    563582}
     
    575594}
    576595.event-meetup .event-icon:before {
     596    content: "\f484";
    577597    content: "\f484" / '';
    578598}
    579599.event-wordcamp .event-icon:before {
     600    content: "\f486";
    580601    content: "\f486" / '';
    581602}
     
    860881
    861882#dashboard_activity .comment-meta span.approve:before {
     883    content: "\f227";
    862884    content: "\f227" / '';
    863885    font: 20px/.5 dashicons;
     
    11341156
    11351157.rss-widget cite:before {
     1158    content: "\2014";
    11361159    content: "\2014" / '';
    11371160}
Note: See TracChangeset for help on using the changeset viewer.