-
Notifications
You must be signed in to change notification settings - Fork 140
Improve GitHub star badge contrast #459
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -104,11 +104,15 @@ div.reference { | |
| height: 1.4rem; | ||
| padding: 0 0.45rem; | ||
| border-radius: 999px; | ||
| background-color: var(--ifm-color-secondary-lightest, rgba(0, 0, 0, 0.08)); | ||
| background-color: rgba(31, 41, 55, 0.08); | ||
| color: var(--ifm-color-emphasis-700); | ||
| border: 1px solid rgba(15, 23, 42, 0.08); | ||
| font-size: 0.75rem; | ||
| font-variant-numeric: tabular-nums; | ||
| } | ||
|
|
||
| [data-theme='dark'] .github-stars-navbar-item__count { | ||
| background-color: var(--ifm-color-secondary-darkest, rgba(255, 255, 255, 0.12)); | ||
| background-color: rgba(148, 163, 184, 0.16); | ||
| color: var(--ifm-color-emphasis-100); | ||
| border: 1px solid rgba(148, 163, 184, 0.35); | ||
|
Comment on lines
+115
to
+117
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The --github-stars-badge-color-rgb: 148, 163, 184;
background-color: rgba(var(--github-stars-badge-color-rgb), 0.16);
color: var(--ifm-color-emphasis-100);
border: 1px solid rgba(var(--github-stars-badge-color-rgb), 0.35); |
||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While these hardcoded
rgbavalues improve contrast, they reduce maintainability. If the site's color palette is updated in the future, these colors will have to be changed manually. Consider defining custom CSS properties for these colors within this rule, or check if any existing Infima variables can be used to derive these colors (e.g., usingrgba(var(--ifm-some-color-rgb), 0.08)).