WordPress.org

Make WordPress Core

Ticket #43532: 43532.diff

File 43532.diff, 2.5 KB (added by audrasjb, 3 years ago)

43532.diff: improves difference between twho revisions

  • src/wp-admin/css/revisions.css

    diff --git a/src/wp-admin/css/revisions.css b/src/wp-admin/css/revisions.css
    index 236d762..e8d1418 100644
    a b table.diff th { 
    220220        font-family: Consolas, Monaco, monospace;
    221221        font-size: 14px;
    222222        line-height: 1.618;
    223         padding: .5em;
     223        padding: .5em .5em .5em 2em;
    224224        vertical-align: top;
    225225        word-wrap: break-word;
    226226}
    table.diff .diff-addedline ins { 
    241241
    242242table.diff .diff-deletedline {
    243243        background-color: #ffe9e9;
     244        position: relative;
     245}
     246
     247table.diff .diff-deletedline:before {
     248        position: absolute;
     249        top: .5em;
     250        left: .5em;
     251        display: inline-block;
     252        content: "\f460";
     253        font-size: 1em;
     254        font-weight: normal;
     255        font-family: dashicons;
     256        -webkit-font-smoothing: antialiased;
     257        -moz-osx-font-smoothing: grayscale;
    244258}
    245259
    246260table.diff .diff-deletedline del {
    table.diff .diff-deletedline del { 
    249263
    250264table.diff .diff-addedline {
    251265        background-color: #e9ffe9;
     266        position: relative;
     267}
     268
     269table.diff .diff-addedline:before {
     270        position: absolute;
     271        top: .5em;
     272        left: .5em;
     273        display: inline-block;
     274        content: "\f132";
     275        font-size: 1em;
     276        font-weight: normal;
     277        font-family: dashicons;
     278        -webkit-font-smoothing: antialiased;
     279        -moz-osx-font-smoothing: grayscale;
    252280}
    253281
    254282table.diff .diff-addedline ins {
  • src/wp-includes/class-wp-text-diff-renderer-table.php

    diff --git a/src/wp-includes/class-wp-text-diff-renderer-table.php b/src/wp-includes/class-wp-text-diff-renderer-table.php
    index a158ea2..c813357 100644
    a b class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { 
    9797         * @return string
    9898         */
    9999        public function addedLine( $line ) {
    100                 return "<td class='diff-addedline'>{$line}</td>";
     100                return "<td class='diff-addedline'><span class='screen-reader-text'>" . __( 'Added:' ) . " </span>{$line}</td>";
    101101
    102102        }
    103103
    class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { 
    108108         * @return string
    109109         */
    110110        public function deletedLine( $line ) {
    111                 return "<td class='diff-deletedline'>{$line}</td>";
     111                return "<td class='diff-deletedline'><span class='screen-reader-text'>" . __( 'Deleted:' ) . " </span>{$line}</td>";
    112112        }
    113113
    114114        /**
    class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { 
    118118         * @return string
    119119         */
    120120        public function contextLine( $line ) {
    121                 return "<td class='diff-context'>{$line}</td>";
     121                return "<td class='diff-context'><span class='screen-reader-text'>" . __( 'Unchanged:' ) . " </span>{$line}</td>";
    122122        }
    123123
    124124        /**