Try: Improve appearance of hover on colored backgrounds. #14501
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current hover state uses solid colors. These work nicely in many cases, but can also end up clashing with the document background if the theme uses a non white/black background color. As initially discussed in #14145 (comment), switching to a color value that uses opacity could positively impact the appearance in these cases.
This PR switches the following color values to their closest opacity equivalents:
$light-gray-500
to$dark-opacity-light-500
$dark-gray-600
to$light-opacity-light-400
The main design issue to note is that the breadcrumb background colors are unchanged in this PR. This is required to ensure proper text contrast of the breadcrumb text. This eliminates a bit of the visual connection between the left border and the breadcrumb. It feels a little clumsy to me, and I'm not totally sold on this solution for that reason.
Screenshots (Light Backgrounds)
Screenshots (Dark Backgrounds)