Skip to content
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

Improve styling for diff hunks #21145

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

clwainwright
Copy link
Contributor

@clwainwright clwainwright commented Nov 24, 2024

This PR changes the background of the created and deleted diff hunks to use the created_background and deleted_background styles, respectively, and it makes the folded indicator for deleted hunks much more visible. Without this, the backgrounds just use a faded version of the foregrounds, which can make it hard to design themes where the gutter marker is sufficiently bright or saturated and the background is sufficiently dark or unsaturated.

Here are some screenshots with a few different themes. Old is on the left, new is on the right.

Andromeda:
image

Summercamp:
image

Rosé Pine Dawn:
image

Release Notes:

  • Diff hunks now use the created_background and deleted_background colors from the theme.
  • The deleted diff gutter indicator is larger.

@SomeoneToIgnore SomeoneToIgnore added the cla-signed The user has signed the Contributor License Agreement label Nov 24, 2024
@maxdeviant maxdeviant changed the title Improved styling for diff hunks Improve styling for diff hunks Nov 24, 2024
@clwainwright
Copy link
Contributor Author

@danilo-leal curious why you prefer the fade-out over using created_background? Seems like this would be exactly the right place to use it, if anywhere.

(if we stick with fade-out, should probably change the release notes or open a different PR)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants