| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179 |
- // Disable font-ligatures for Chromium based browsers
- // Chromium requires `font-variant-ligatures: none` in addition to `font-feature-settings "liga" 0`
- * {
- font-feature-settings: "liga" 0;
- font-variant-ligatures: none;
- }
- // Restore default foreground & background colors for <pre> blocks
- pre {
- background-color: transparent;
- color: inherit;
- }
- // Slightly increase alert contrast between bg and text
- .alert {
- background: var(--#{$prefix}bg-surface);
- }
- // Permit copying of badge text
- .badge {
- user-select: text;
- }
- // Button adjustments
- .btn {
- // Tabler sets display: flex
- display: inline-block;
- &:focus {
- // Add button focus state
- border: 1px solid var(--tblr-primary-fg);
- outline: 2px solid var(--tblr-primary) !important;
- }
- }
- .btn-sm {
- // $border-radius-sm (2px) is too small
- border-radius: $border-radius;
- }
- // Dropdown items
- .dropdown-item {
- // Tabler sets display: flex
- display: inline-block;
- }
- // Set footer icon color
- .footer .text-primary {
- color: $rich-black !important;
- }
- // Tabs
- .nav-tabs {
- .nav-link {
- // Tabler sets display: flex
- display: inline-block;
- }
- }
- // Altering background colors
- .page, .page-tabs .nav-tabs .nav-link.active {
- background-color: var(--#{$prefix}bg-surface-tertiary) !important;
- }
- // Navigation bar
- .navbar {
- // Lighten highlight color of active item
- --tblr-navbar-active-bg: rgba(0, 0, 0, 0.06);
- }
- // 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}link-color-rgb: 0,242,212;
- --#{$prefix}link-hover-color-rgb: 0,242,212;
- --#{$prefix}secondary: #{$gray-400};
- --#{$prefix}primary: #{$bright-teal};
- --#{$prefix}primary-fg: #{$rich-black};
- --#{$prefix}primary-rgb: 0,242,212;
- --#{$prefix}btn-active-color: #{$rich-black};
- }
- }
- // Dark mode overrides
- body[data-bs-theme=dark] {
- // Override background color alpha value
- ::selection {
- background-color: rgba(var(--tblr-primary-rgb),.48);
- }
- .btn-primary {
- color: $rich-black !important;
- }
- // Change content color when primary teal changes with theme
- .bg-primary {
- .card-title,a,i {
- color: $rich-black !important;
- }
- }
- .text-bg-primary {
- color: $rich-black !important;
- }
- // Altering background colors
- .card {
- background: $rich-black !important;
- }
- // 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;
- }
- .page-link.active, .active>.page-link {
- color: $rich-black;
- }
- // Adjusting text colors
- .text- {
- &bg-primary {
- color: $rich-black !important;
- }
- &muted {
- color: var(--#{$prefix}secondary-color) !important;
- }
- &secondary {
- color: $gray-400 !important;
- }
- }
- .footer .text-primary {
- color: white !important;
- }
- .toast {
- color: var(--#{$prefix}body-color);
- }
- .table-primary {
- --tblr-table-bg: rgba(var(--tblr-secondary-rgb), 0.48);
- --tblr-table-hover-bg: inherit;
- --tblr-table-hover-color: inherit;
- }
- }
- // Do not apply padding to <code> elements inside a <pre>
- pre code {
- padding: unset;
- }
- // Use an icon instead of Tabler's native "caret" for dropdowns (avoids a Safari bug)
- .dropdown-toggle:after{
- font-family: "Material Design Icons";
- content: '\F0140';
- padding-right: 9px;
- border-bottom: none;
- border-left: none;
- transform: none;
- vertical-align: .05em;
- height: auto;
- }
- // Theme-based visibility utilities
- // Tabler's .hide-theme-* utilities expect data-bs-theme on :root, but NetBox applies
- // it to body. These overrides use higher specificity selectors to ensure theme-based
- // visibility works correctly. The :root:not(.dummy) pattern provides the additional
- // specificity needed to override Tabler's :root:not() rules.
- :root:not(.dummy) body[data-bs-theme='light'] .hide-theme-light,
- :root:not(.dummy) body[data-bs-theme='dark'] .hide-theme-dark {
- display: none !important;
- }
- :root:not(.dummy) body[data-bs-theme='dark'] .hide-theme-light,
- :root:not(.dummy) body[data-bs-theme='light'] .hide-theme-dark {
- display: inline-flex !important;
- }
|