sqlx-cli: drop the literal style override that was invisible on light terminals#4263
Open
c-tonneslan wants to merge 2 commits into
Open
sqlx-cli: drop the literal style override that was invisible on light terminals#4263c-tonneslan wants to merge 2 commits into
c-tonneslan wants to merge 2 commits into
Conversation
White is invisible on light terminal backgrounds. Cyan is readable on both light and dark backgrounds, so it's a better default for the literal style. Fixes launchbadge#4112
rnestler
reviewed
May 26, 2026
| .header(AnsiColor::Blue.on_default().bold()) | ||
| .usage(AnsiColor::Blue.on_default().bold()) | ||
| .literal(AnsiColor::White.on_default()) | ||
| .literal(AnsiColor::Cyan.on_default()) |
There was a problem hiding this comment.
Suggested change
| .literal(AnsiColor::Cyan.on_default()) |
The default color is readable as well.
Default terminal color is readable on both light and dark backgrounds, which is the original bug. No need to pick a specific replacement color. Signed-off-by: Charlie Tonneslan <cst0520@gmail.com>
Author
|
Thanks, good call. Dropped the line and updated the PR title/body to match. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #4112.
AnsiColor::Whiteis invisible on light/white terminal backgrounds. Dropping the explicit.literal()style lets it fall back to the terminal default, which is readable on both light and dark terminals.(Initial version switched to Cyan; per maintainer feedback, default is fine.)