Skip to content

GitHub Diff Color Customizer by bguest

Details

Authorbguest

LicenseNo License

Categoryscm.***.com

Created

Updated

Size2.5 kB

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

Changes diff colors for colorblindness

Notes

Changes diff colors for colorblindness

Source code

/* ==UserStyle==
@name        GitHub Diff Color Customizer
@namespace   StylishThemes
@version     1.0.0
@description Add diff color customization
@license     CC-BY-SA-4.0
@author      StylishThemes
@advanced color deleted-line "Deleted Line Bkgd" #ffcc33
@advanced color deleted-text "Deleted Line Text" #979797
@advanced color deleted-code "Deleted Code Bkgd" #ffd96359
@advanced color deleted-hover "Deleted Hover Bkgd" #805f0059
@advanced color added-line "Added Line Bkgd" #3986ff
@advanced color added-text "Added Line Text" #fff
@advanced color added-code "Added Code Bkgd" #3986ff59
@advanced color added-hover "Added Hover Bkgd" #004cc159
@preprocessor default
==/UserStyle== */
@-moz-document url-prefix("https://scm.starbucks.com/") {

    /*** Based on https://userstyles.org/styles/149864/github-diff-colorblind-friendly ***
  .blob-num sets the colors in the number columns on the left 
  .blob-code sets the color of the rest of the line
  .blob-code .x sets the word-diff highlight color
  ***/
    .highlight .blob-num-deletion,
    .highlight .blob-code-deletion .x {
        background-color: var(--deleted-line) !important;
        color: var(--deleted-text) !important;
    }

    .highlight .blob-code-deletion {
        background-color: var(--deleted-code) !important;
        color: var(--deleted-text) !important;
    }

    body .highlight:not(.lines) tr:not(.inline-comments):hover td.blob-num-deletion:not(.line-age),
    body .highlight:not(.lines) tr:not(.inline-comments):hover td.blob-code-deletion:not(.line-age) {
        background: var(--deleted-hover) !important;
    }

    body .highlight:not(.lines) tr:not(.inline-comments):hover td.blob-num-deletion:not(.line-age):before {
        color: var(--deleted-text) !important;
    }

    .highlight .blob-num-addition,
    .highlight .blob-code-addition .x {
        background-color: var(--added-line) !important;
        color: var(--added-text) !important;
    }

    .highlight .blob-code-addition {
        background-color: var(--added-code) !important;
        color: var(--added-text) !important;
    }

    body .highlight:not(.lines) tr:not(.inline-comments):hover td.blob-num-addition:not(.line-age),
    body .highlight:not(.lines) tr:not(.inline-comments):hover td.blob-code-addition:not(.line-age) {
        background: var(--added-hover) !important;
    }

    body .highlight:not(.lines) tr:not(.inline-comments):hover td.blob-num-addition:not(.line-age):before {
        color: var(--added-text) !important;
    }
}

Reviews

No reviews yet.