Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Comment on lines +107 to +109

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While these hardcoded rgba values 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., using rgba(var(--ifm-some-color-rgb), 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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The background-color and border properties use the same RGB values with different alpha transparencies. You can define a custom CSS property for the RGB values to avoid repetition and improve maintainability. This makes the relationship between the colors explicit and easier to manage.

  --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);

}