Making WordPress.org


Ignore:
Timestamp:
08/26/2021 11:34:14 PM (3 years ago)
Author:
coffee2code
Message:

Developer, Dashicons: Use human-readable labels for icons instead of character codes.

Makes it clear when scanning grid what a particular icon represents and facilitates in-page (ctrl-f) browser searches for finding an icon.

  • Outputs icons as list items instead of divs
  • Reformats output markup of dashicons to avoid use of hidden text
  • Embeds keywords and character codes as data attributes
  • Preserves filtered keyword search

Props dufresnesteven, ryelle, coffee2code.
Fixes #5014

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/scss/page-dashicons.scss

    r11203 r11206  
    104104        }
    105105
     106        ul {
     107            margin: 0;
     108        }
     109
    106110        .dashicons {
    107111            position: relative;
     
    111115            width: $size;
    112116            height: $size;
    113             overflow: hidden;
    114117            white-space: nowrap;
    115118            font-size: $iconsize;
     
    117120            cursor: pointer;
    118121
    119             &:before {
    120                 margin-right: $size;
    121                 position: relative;
    122                 left: 20px;
    123             }
    124 
    125             &:after {
    126                 content: attr(alt);
     122            &:hover {
     123                color: #d54e21;
     124            }
     125
     126            span {
    127127                display: block;
    128128                font-size: 14px;
    129                 color: #999;
     129                color: #888;
     130                margin-top: $gutter;
    130131                text-align: center;
    131                 margin-top: $gutter;
    132             }
    133 
    134             &:hover {
    135                 color: #d54e21;
     132                word-wrap: break-word;
     133                white-space: normal;
    136134            }
    137135        }
Note: See TracChangeset for help on using the changeset viewer.