-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update theme to hilight whole lines #13
Comments
Hi @ybart ! This is a nice idea. I've been using the built-in mechanisms for selecting colors for the diff text, based on variables that theme designers can then override. Example: language-diff/styles/diff.less Lines 4 to 6 in ae62323
I'm not certain that choosing definitive values is the right way to go here - are you aware of any specific theme color variables that are used across all Atom themes to highlight/invert? |
I'm not aware of such variables names. However, ˋsyntax-backgoround-color-addedˋ might be a good fit. We might also need to lighten and desature foreground colors as well to achieve a clean result. Maybe we could also derivate these from syntax-background-color? |
Hi @ybart - An inherent problem is that I haven't figured out a way to "detect" if the user's theme is a dark or light one, and then shade/tint the colors accordingly. This may exist in LESS or Atom, I haven't found it yet. The danger of using absolute values is that the behavior changes based on the user's theme, and I want to provide the best possible solution that doesn't look "bad" on a user's screen. I had tried using I'll leave this issue open for now, but anyone looking to help out with this is welcome to. |
Thanks you very much for your investigation. Unfortunately I don't have much time to investigate now. However I found this stack question interesting. However it will require some time to adjust and test with most common themes. https://stackoverflow.com/questions/21600825/conditional-css-based-on-background-color-variable A faster option would be to propose 2 or 3 variants and let the user choose in settings. |
I thought it would be great to hilight the whole diffed lines, so I ended using the following stylesheet:
It renders well with my theme (solarized-dark), but colors might need to be changed to use theme colors.
Here is a preview:
I got the CSS from here : https://discuss.atom.io/t/highlight-entire-line-depending-on-syntax/20653
The text was updated successfully, but these errors were encountered: