From bea989070bbb1389ca05e67118786beb55321e55 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 29 Jan 2020 00:51:58 -0600 Subject: [PATCH] Comment: (github.styl) Issue label text color Black provides poor contrast with some dark label colors, so using white seems like the best choice for maximum contrast with arbitrary label colors. But since the default label color is light gray, that would make for very poor contrast on new labels. So we use a CSS drop shadow to compensate for that. Hopefully it's a reasonable compromise, because there's only so much that can be done. But none of this works because Stylus can't handle :not(), or something like that. See comment in file. So this is really just a note for the future, because I don't feel like hacking up all the generated CSS for the sake of GitHub labels. *sigh* --- sites/generic.styl | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sites/generic.styl b/sites/generic.styl index 5d33658..45e896d 100644 --- a/sites/generic.styl +++ b/sites/generic.styl @@ -7,6 +7,23 @@ // ** HTML elements * border-color() + +// HACK: Don't apply A color to GitHub issue labels. This should not +// be done here, but to do otherwise would require removing the A rule +// from this file and adding it to all other sites manually. The +// issue is that GitHub assigns label colors in tags +// depending on the label's background color, so we don't want to +// override label A colors, but there is no way in CSS to negate +// !important for certain selectors. + +// But apparently Stylus (or the version I have, at least, who knows) +// doesn't support :not(), and it removes it from the CSS files it +// compiles. So while this hack might work in the future, it appears +// that, for now, the GitHub CSS must be edited manually after +// generation. What an awful idea... + +// a:not(.IssueLabel) + a a() a:visited