Skip to content

16649 general contrast issues #16759

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

Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion netbox/project-static/dist/netbox.css

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions netbox/project-static/styles/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,16 @@ $hover-bg: rgba(var(--tblr-secondary-rgb), 0.08);

// Ensure active nav-pill has a background color in dark mode
$nav-pills-link-active-bg: rgba(var(--tblr-secondary-rgb), 0.15);

// Colors
$rich-black: #001423;
$rich-black-light: #081B2A;
$rich-black-lighter: #0D202E;
$rich-black-lightest: #1A2C39;
$bright-teal: #00F2D4;
$dark-teal: #00857D;

$primary: $dark-teal;

// Navbar active dropdown border color
$navbar-active-border-color: $bright-teal;
70 changes: 67 additions & 3 deletions netbox/project-static/styles/overrides/_tabler.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,76 @@ pre {
display: inline-block;;
}

table a {
// Adjust table anchor link contrast as not enough contrast in dark mode
filter: brightness(110%);
table th.orderable a {
color: var(--#{$prefix}body-color);
}

// Override background color alpha value
[data-bs-theme=dark] ::selection {
background-color: rgba(var(--tblr-primary-rgb),.48)
}

// Dark mode colors
@if $enable-dark-mode {
@include color-mode(dark, true) {
--#{$prefix}alert-color: darken(var(--#{$prefix}warning),10%);
--#{$prefix}link-color: #{$bright-teal};
--#{$prefix}secondary: #{$gray-400};
}
}

// Slightly increase alert contrast between bg and text
.alert {
background: var(--#{$prefix}bg-surface);
}

// Altering background colors
.page, .page-tabs .nav-tabs .nav-link.active {
background-color: var(--#{$prefix}bg-surface-tertiary)!important;
}
.page-body .card .card-header {
background: var(--tblr-bg-surface-secondary)!important;
}

.footer .text-primary {
color: $rich-black!important;
}

// Dark mode overrides
body[data-bs-theme=dark] {

// Background colors to match brand colors
background-color: $rich-black;
.navbar, .page-header {
background-color: $rich-black;
}
.page, .page-tabs .nav-tabs .nav-link.active {
background-color: $rich-black-light!important;
}

// Adjust dark table link color without affecting buttons and badges
table {
a {
color: $bright-teal;
}
.badge a {
color: inherit;
}
.btn {
color: var(--#{$prefix}body-color);
}
}

// Adjusting text colors
.text- {
&muted {
color: var(--#{$prefix}secondary-color) !important;
}
&secondary {
color: $gray-400!important;
}
}
.footer .text-primary {
color: white!important;
}
}
8 changes: 8 additions & 0 deletions netbox/project-static/styles/transitional/_navigation.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
// Navbar styling
.navbar-vertical.navbar-expand-lg {
background-color: $rich-black;
.dropdown-item {
color: white!important;
}
.text-secondary {
color: $bright-teal!important;
}

.navbar-collapse {
.dropdown-menu {
.dropdown-item {
Expand Down