Skip to content

Commit

Permalink
task: add github-dark-diff-color-customizer closes StylishThemes/GitH…
Browse files Browse the repository at this point in the history
  • Loading branch information
the-j0k3r committed Nov 11, 2019
1 parent e0b8532 commit 3a52871
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ Install [Stylus](https://add0n.com/stylus.html) for either [Firefox](https://add
📦 [Install the GitHub Dark Element Borders usercss](https://raw.githubusercontent.com/StylishThemes/Feature-Override-Styles/master/github-dark-element-borders.user.css) [Will remove GitHub Dark's borders in some elements](https://github.com/StylishThemes/GitHub-Dark/issues/1017), this is a companion script for [GitHub Dark](https://github.com/StylishThemes/GitHub-Dark) style.<br>
>Note: Not to be used on its own without the Wikipedia Dark style also installed ;)

📦 [Install the GitHub Dark Diff Color Customizer usercss](https://raw.githubusercontent.com/StylishThemes/Feature-Override-Styles/master/github-dark-diff-color-customizer.user.css) [Is a colorblind friedly GitHub Dark's diff colors](https://github.com/StylishThemes/GitHub-Dark/issues/1016), this is a companion script for [GitHub Dark](https://github.com/StylishThemes/GitHub-Dark) style.<br>
>Note: Not to be used on its own without the Wikipedia Dark style also installed ;)
<br>
## Contributions
Expand Down
61 changes: 61 additions & 0 deletions github-dark-diff-color-customizer.user.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/* ==UserStyle==
@name GitHub Dark Diff Color Customizer
@namespace StylishThemes
@version 0.0.2
@description A diff color customization style, colorblind friendly by default
@author StylishThemes
@homepageURL https://github.com/StylishThemes/Feature-Override-Styles/
@supportURL https://github.com/StylishThemes/Feature-Override-Styles/issues
@updateURL https://raw.githubusercontent.com/StylishThemes/Feature-Override-Styles/master/github-dark-diff-color-customizer.user.css
@license CC-BY-SA-4.0
@var color deleted-line "Deleted line bkgd" #ffcc33
@var color deleted-text "Deleted line text" #979797
@var color deleted-code "Deleted code bkgd" #ffd96359
@var color deleted-hover "Deleted Hover bkgd" #805f0059
@var color added-line "Added Line bkgd" #3986ff
@var color added-text "Added Line text" #fff
@var color added-code "Added Code bkgd" #3986ff59
@var color added-hover "Added Hover bkgd" #004cc159
@preprocessor stylus
==/UserStyle== */
@-moz-document regexp("^https?://((gist|guides|help|lab|launch-editor|raw|resources|status|developer)\\.)?github\\.com/((?!generated_pages/preview).)*$") {
/*** 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: deleted-line !important;
color: deleted-text !important;
}
.highlight .blob-code-deletion {
background-color: deleted-code !important;
color: 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: deleted-hover !important;
}
body .highlight:not(.lines) tr:not(.inline-comments):hover td.blob-num-deletion:not(.line-age):before {
color: deleted-text !important;
}
.highlight .blob-num-addition,
.highlight .blob-code-addition .x {
background-color: added-line !important;
color: added-text !important;
}
.highlight .blob-code-addition {
background-color: added-code !important;
color: 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: added-hover !important;
}
body .highlight:not(.lines) tr:not(.inline-comments):hover td.blob-num-addition:not(.line-age):before {
color: added-text !important;
}
}

1 comment on commit 3a52871

@the-j0k3r
Copy link
Member Author

@the-j0k3r the-j0k3r commented on 3a52871 Nov 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong link to close issue it was supposed to be StylishThemes/GitHub-Dark#1006 instead

Please sign in to comment.