git-blame
git-blame copied to clipboard
Use existing font settings
git-blame appears to assume a dark UI instead of just using some existing classes to set font color.

Makes it hard to read the date when it is white on white.
Actually if you look at the less file you can see it does rely on existing classes. It never actually sets a text color. It does set background-color, and even then by slightly darkening and lightening the @base-backgroud-color.
In your screenshot I don't understand why the background is white if the rest of your editor is dark. What theme are you using?
Ahh, I see the problem. I'm using Atom Light UI and Atom Dark Theme. So because you're using the UI's background color rather than the background color for the gutter (whatever that is) it doesn't work right when the UI and the theme are mismatched.
I haven't done any extension development, so I'm not sure what the style is for gutter, but git-blame ought to use the same.
It's a great extension! Thank you for the time you've spent creating and supporting it.
I haven't looked at this is a while but as Desmond said it's not hard coded. If the gutter background color is exposed we can switch to lighten that one instead easily. Will take a look into this.
On Saturday, August 16, 2014, Jacob Wright [email protected] wrote:
Ahh, I see the problem. I'm using Atom Light UI and Atom Dark Theme. So because you're using the UI's background color rather than the background color for the gutter (whatever that is) it doesn't work right when the UI and the theme are mismatched.
I haven't done any extension development, so I'm not sure what the style is for gutter, but git-blame ought to use the same.
It's a great extension! Thank you for the time you've spent creating and supporting it.
— Reply to this email directly or view it on GitHub https://github.com/alexcorre/git-blame/issues/22#issuecomment-52395639.
Alex Corre [email protected] 310.694.4325
I briefly looked into this but didn't come up with anything I liked enough for a PR. Here's what I learnt in case you want to continue it @jacwright:
@import "syntax-variables" will import the less variables used by the syntax theme. Right now we're doing @import "ui-variables" which gives styles from the UI theme.
Once you @import "syntax-variables", you have a couple of relevant variables @syntax-gutter-background-color and @syntax-gutter-text-color. But there's not much else. And the rest of the 'default' style seem to be aligned with the UI theme, not the editor theme. For example, right now we are using the default styles for <a>s and also the .text-hightlight class. But both of these are aligned with the UI theme, not the editor theme.
Thanks @dmnd! That will be a great help. I'll see what I can come up with.
Hey @jacwright any ideas on a fix for this?
I haven't looked into it. Things have been busy. I'll try and come back to it eventually.
I added this in my ~/.atom/styles.less:
atom-text-editor::shadow .git-blame-mount,
atom-text-editor .git-blame-mount {
@git-blame-bg-color: #222;
.git-blame .git-blame-scroller {
background-color: @git-blame-bg-color;
border: none;
.blame-lines .blame-line {
&.line-bg-lighter { background-color: lighten(@git-blame-bg-color, 4%); }
&.line-bg-darker { background-color: darken(@git-blame-bg-color, 4%); }
}
}
}
and it looks like this:

Maybe it will be helpful for someone.