2021-04-26 00:31:51 -07:00
|
|
|
// Netbox-specific Styles and Overrides.
|
|
|
|
|
|
|
|
@use 'sass:map';
|
2021-08-02 02:18:31 -07:00
|
|
|
@import './sidenav';
|
|
|
|
@import './overrides';
|
|
|
|
@import './utilities';
|
|
|
|
@import './variables';
|
2021-07-13 09:14:57 -07:00
|
|
|
|
2021-05-07 16:40:24 -07:00
|
|
|
@each $color, $value in $theme-colors {
|
2021-07-24 17:08:18 -07:00
|
|
|
// Override CSS values on each theme color.
|
|
|
|
|
|
|
|
// Use Bootstrap's method of coloring alert links to appropriately color close buttons within
|
|
|
|
// another colored element.
|
|
|
|
// See: https://github.com/twbs/bootstrap/blob/2bdbb42dcf6bfb99b5e9e5444d9e64589eb8c08f/scss/_alert.scss#L50-L52
|
|
|
|
// See: https://github.com/twbs/bootstrap/blob/2bdbb42dcf6bfb99b5e9e5444d9e64589eb8c08f/scss/_close.scss#L12
|
2021-08-01 11:53:35 -07:00
|
|
|
$shifted-bg: shift-color($value, $alert-bg-scale);
|
|
|
|
$shifted-color: shift-color($value, $alert-color-scale);
|
|
|
|
|
|
|
|
@if (contrast-ratio($shifted-bg, $shifted-color) < $min-contrast-ratio) {
|
|
|
|
$shifted-color: mix($value, color-contrast($shifted-bg), abs($alert-color-scale));
|
|
|
|
}
|
|
|
|
|
|
|
|
$btn-close-bg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$shifted-color}'><path d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/></svg>");
|
2021-07-24 17:08:18 -07:00
|
|
|
.bg-#{$color} button.btn-close {
|
|
|
|
background: transparent escape-svg($btn-close-bg) center / $btn-close-width auto no-repeat;
|
|
|
|
}
|
|
|
|
|
2021-07-29 17:33:10 -07:00
|
|
|
.btn.btn-ghost-#{$color} {
|
|
|
|
color: $value;
|
|
|
|
&:hover {
|
|
|
|
background-color: rgba($value, 0.12);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-24 17:08:18 -07:00
|
|
|
// Use Bootstrap's method of coloring the .alert-link class automatically.
|
|
|
|
// See: https://github.com/twbs/bootstrap/blob/2bdbb42dcf6bfb99b5e9e5444d9e64589eb8c08f/scss/_alert.scss#L50-L52
|
2021-08-01 11:53:35 -07:00
|
|
|
|
|
|
|
.alert.alert-#{$color},
|
|
|
|
.table-#{$color} {
|
|
|
|
// Exclude buttons.
|
|
|
|
a:not(.btn) {
|
|
|
|
font-weight: $font-weight-bold;
|
|
|
|
color: $shifted-color;
|
|
|
|
}
|
|
|
|
// Apply a border to buttons contained within colored elements, if they're not already a
|
|
|
|
// bordered button class.
|
|
|
|
.btn:not([class*='btn-outline']) {
|
|
|
|
border-color: $gray-700;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Toasts required a slightly different approach because the background color isn't "shifted",
|
|
|
|
// it's the direct theme color.
|
|
|
|
.toast.bg-#{$color} {
|
|
|
|
$shifted-color: shift-color($value, $alert-color-scale);
|
|
|
|
|
|
|
|
@if (contrast-ratio($value, $shifted-color) < $min-contrast-ratio) {
|
|
|
|
$shifted-color: mix($value, color-contrast($value), abs($alert-color-scale));
|
|
|
|
}
|
|
|
|
a:not(.btn) {
|
2021-07-24 17:08:18 -07:00
|
|
|
font-weight: $font-weight-bold;
|
2021-08-01 11:53:35 -07:00
|
|
|
color: $shifted-color;
|
2021-07-24 17:08:18 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Use proper contrasting color foreground color for special components.
|
2021-05-07 16:40:24 -07:00
|
|
|
.badge,
|
2021-05-22 17:17:31 -07:00
|
|
|
.toast,
|
2021-07-24 17:23:37 -07:00
|
|
|
.toast-header,
|
2021-05-07 16:40:24 -07:00
|
|
|
.progress-bar {
|
|
|
|
&.bg-#{$color} {
|
|
|
|
color: color-contrast($value);
|
|
|
|
}
|
|
|
|
}
|
2021-07-24 17:08:18 -07:00
|
|
|
|
|
|
|
// Use proper foreground color in the alert body. Note: this is applied to p, & small because
|
2021-07-14 17:55:01 -07:00
|
|
|
// we *don't* want to override the h1-h6 colors for alerts, since those are set to a color
|
|
|
|
// similar to the alert color.
|
|
|
|
.alert.alert-#{$color} {
|
|
|
|
p,
|
|
|
|
small {
|
|
|
|
color: color-contrast($value);
|
|
|
|
}
|
|
|
|
}
|
2021-05-07 16:40:24 -07:00
|
|
|
}
|
|
|
|
|
2021-05-07 16:57:38 -07:00
|
|
|
// Ensure progress bars (utilization graph) in tables aren't too narrow to display the percentage.
|
|
|
|
table td > .progress {
|
|
|
|
min-width: 6rem;
|
|
|
|
}
|
|
|
|
|
2021-08-03 08:32:53 -07:00
|
|
|
// Override Bootstrap form-control font-size when contained by .small element.
|
|
|
|
.small .form-control {
|
|
|
|
font-size: $font-size-sm;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Automatically space out adjacent columns, but not within card bodies.
|
|
|
|
:not(.card-body) > .col:not(:last-child):not(:only-child) {
|
2021-08-02 02:18:31 -07:00
|
|
|
margin-bottom: $spacer;
|
|
|
|
}
|
|
|
|
|
2021-07-30 00:35:38 -07:00
|
|
|
.nav-mobile {
|
|
|
|
display: none;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
@include media-breakpoint-down(lg) {
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
|
|
|
|
.nav-mobile-top {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-13 09:14:57 -07:00
|
|
|
.card > .table.table-flush {
|
|
|
|
margin-bottom: 0;
|
|
|
|
overflow: hidden;
|
|
|
|
border-bottom-right-radius: $card-border-radius;
|
|
|
|
border-bottom-left-radius: $card-border-radius;
|
2021-08-02 02:18:31 -07:00
|
|
|
|
2021-07-13 09:14:57 -07:00
|
|
|
thead th[scope='col'] {
|
|
|
|
padding-top: map.get($spacers, 3);
|
|
|
|
padding-bottom: map.get($spacers, 3);
|
2021-08-02 02:18:31 -07:00
|
|
|
text-transform: uppercase;
|
|
|
|
vertical-align: middle;
|
|
|
|
background-color: $table-flush-header-bg;
|
2021-07-13 09:14:57 -07:00
|
|
|
border-top: 1px solid $card-border-color;
|
2021-08-02 02:18:31 -07:00
|
|
|
border-bottom-color: $card-border-color;
|
2021-07-13 09:14:57 -07:00
|
|
|
}
|
2021-08-02 02:18:31 -07:00
|
|
|
|
2021-07-13 09:14:57 -07:00
|
|
|
th,
|
|
|
|
td {
|
|
|
|
padding-right: map.get($spacers, 4) !important;
|
2021-08-02 02:18:31 -07:00
|
|
|
padding-left: map.get($spacers, 4) !important;
|
|
|
|
border-right: 0;
|
|
|
|
border-left: 0;
|
2021-07-13 09:14:57 -07:00
|
|
|
}
|
|
|
|
tr[class] {
|
|
|
|
border-color: $card-border-color !important;
|
|
|
|
&:last-of-type {
|
|
|
|
border-bottom-color: transparent !important;
|
|
|
|
border-bottom-right-radius: $card-border-radius;
|
|
|
|
border-bottom-left-radius: $card-border-radius;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-14 17:55:01 -07:00
|
|
|
// Primarily used for the new release notification, but could be used for other alerts as needed.
|
|
|
|
// Wrap any alerts in .header-alert-container to ensure the layout is consistent.
|
|
|
|
.header-alert-container {
|
|
|
|
// Center-align the alert(s).
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2021-08-02 02:18:31 -07:00
|
|
|
justify-content: center;
|
2021-07-14 17:55:01 -07:00
|
|
|
// Apply the same spacing that's applied to the #content div's first child (.px-3).
|
|
|
|
padding: 0 $spacer;
|
|
|
|
|
|
|
|
// By default, alerts inside .header-alert-container should take up the full width.
|
|
|
|
.alert {
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
// Adjust the max-width for larger screens so there's not a big ugly blue blob taking up the
|
|
|
|
// entire screen.
|
|
|
|
@include media-breakpoint-up(md) {
|
|
|
|
max-width: 75%;
|
|
|
|
}
|
|
|
|
@include media-breakpoint-up(lg) {
|
|
|
|
max-width: 50%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-22 17:20:17 -07:00
|
|
|
span.profile-button .dropdown-menu {
|
|
|
|
right: 0;
|
|
|
|
left: auto;
|
2021-08-02 02:18:31 -07:00
|
|
|
display: block !important;
|
2021-06-22 17:20:17 -07:00
|
|
|
margin-top: 0.5rem;
|
|
|
|
box-shadow: $box-shadow;
|
2021-08-02 02:18:31 -07:00
|
|
|
transition: opacity 0.2s ease-in-out;
|
|
|
|
|
2021-06-22 17:20:17 -07:00
|
|
|
&:not(.show) {
|
2021-06-23 10:57:09 -07:00
|
|
|
pointer-events: none;
|
2021-08-02 02:18:31 -07:00
|
|
|
opacity: 0;
|
2021-06-22 17:20:17 -07:00
|
|
|
}
|
|
|
|
&.show {
|
2021-06-23 10:57:09 -07:00
|
|
|
pointer-events: auto;
|
2021-08-02 02:18:31 -07:00
|
|
|
opacity: 1;
|
2021-06-22 17:20:17 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-05-23 00:31:48 -07:00
|
|
|
div#advanced-search-content div.card div.card-body div.col:not(:last-child) {
|
|
|
|
margin-right: 1rem;
|
|
|
|
}
|
|
|
|
|
2021-08-02 02:18:31 -07:00
|
|
|
table {
|
|
|
|
a {
|
|
|
|
text-decoration: none;
|
|
|
|
&:hover {
|
|
|
|
text-decoration: underline;
|
2021-04-25 20:11:46 -07:00
|
|
|
}
|
|
|
|
}
|
2021-08-02 02:18:31 -07:00
|
|
|
&.table > :not(caption) > * > * {
|
|
|
|
padding-right: $table-cell-padding-x-sm !important;
|
|
|
|
padding-left: $table-cell-padding-x-sm !important;
|
|
|
|
}
|
|
|
|
td,
|
|
|
|
th {
|
|
|
|
font-size: $font-size-sm;
|
|
|
|
line-height: $line-height-sm;
|
|
|
|
vertical-align: middle;
|
|
|
|
&.min-width {
|
|
|
|
width: 1%;
|
2021-05-23 13:08:44 -07:00
|
|
|
}
|
2021-08-02 02:18:31 -07:00
|
|
|
.form-check-input {
|
|
|
|
// Ensure checkboxes aren't too small inside object tables.
|
|
|
|
margin-top: 0.125em;
|
|
|
|
font-size: $font-size-base;
|
2021-04-25 20:11:46 -07:00
|
|
|
}
|
2021-07-17 12:51:40 -07:00
|
|
|
|
2021-08-02 02:18:31 -07:00
|
|
|
.btn-sm {
|
|
|
|
line-height: $line-height-xs;
|
2021-04-25 20:11:46 -07:00
|
|
|
}
|
|
|
|
|
2021-08-02 02:18:31 -07:00
|
|
|
p {
|
|
|
|
// Remove spacing from paragraph elements within tables.
|
|
|
|
margin-bottom: 0;
|
2021-04-25 20:11:46 -07:00
|
|
|
}
|
|
|
|
}
|
2021-08-02 02:18:31 -07:00
|
|
|
|
|
|
|
&.object-list {
|
2021-04-30 11:27:51 -07:00
|
|
|
th {
|
2021-08-02 02:18:31 -07:00
|
|
|
font-size: $font-size-xs;
|
|
|
|
line-height: $line-height-xs;
|
|
|
|
vertical-align: bottom;
|
2021-04-30 11:27:51 -07:00
|
|
|
}
|
2021-08-02 02:18:31 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
&.attr-table {
|
|
|
|
th {
|
|
|
|
width: 25%;
|
2021-07-21 11:20:35 -04:00
|
|
|
}
|
2021-04-30 11:27:51 -07:00
|
|
|
}
|
2021-04-25 20:11:46 -07:00
|
|
|
}
|
|
|
|
|
2021-04-26 00:31:51 -07:00
|
|
|
div.title-container {
|
|
|
|
display: flex;
|
2021-08-06 17:56:38 -07:00
|
|
|
// On small screens, `flex-direction: column;` ensures the control buttons don't appear on the
|
|
|
|
// same line as the title, but rather break to the next line.
|
|
|
|
flex-direction: column;
|
2021-04-26 00:31:51 -07:00
|
|
|
flex-wrap: wrap;
|
2021-08-02 02:18:31 -07:00
|
|
|
justify-content: space-between;
|
2021-04-26 00:31:51 -07:00
|
|
|
|
2021-08-06 17:56:38 -07:00
|
|
|
@include media-breakpoint-up(lg) {
|
|
|
|
// On large screens, `flex-direction: row;` allows the control buttons to appear vertically
|
|
|
|
// aligned with the title.
|
|
|
|
flex-direction: row;
|
|
|
|
}
|
|
|
|
|
2021-08-02 02:18:31 -07:00
|
|
|
#content-title {
|
2021-04-26 00:31:51 -07:00
|
|
|
display: flex;
|
2021-08-05 09:59:13 -07:00
|
|
|
flex: 1 0;
|
2021-08-02 02:18:31 -07:00
|
|
|
flex-direction: column;
|
2021-04-26 00:31:51 -07:00
|
|
|
padding-bottom: map.get($spacers, 2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-08-03 10:03:22 -07:00
|
|
|
// Object list control buttons (Add/Clone/Import/Export)
|
|
|
|
.controls {
|
|
|
|
margin-bottom: map.get($spacers, 2);
|
|
|
|
|
|
|
|
// Each group of buttons.
|
|
|
|
.control-group {
|
|
|
|
display: flex;
|
|
|
|
flex-wrap: wrap;
|
2021-08-03 11:41:46 -07:00
|
|
|
// Left-align controls on mobile.
|
|
|
|
justify-content: flex-start;
|
|
|
|
|
|
|
|
// Right-align controls on larger screens.
|
|
|
|
@include media-breakpoint-up(md) {
|
|
|
|
justify-content: flex-end;
|
|
|
|
}
|
2021-08-03 10:03:22 -07:00
|
|
|
|
|
|
|
> * {
|
|
|
|
// Pad each control button.
|
|
|
|
margin: map.get($spacers, 1);
|
|
|
|
|
|
|
|
&:first-child {
|
|
|
|
// Don't pad the left side of the first control button.
|
|
|
|
margin-left: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:last-child {
|
|
|
|
// Don't pad the right side of the last control button.
|
|
|
|
margin-right: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-08-03 11:41:46 -07:00
|
|
|
.object-subtitle {
|
|
|
|
display: block;
|
|
|
|
font-size: $font-size-sm;
|
|
|
|
color: $text-muted;
|
|
|
|
|
|
|
|
@include media-breakpoint-up(md) {
|
|
|
|
display: inline-block;
|
|
|
|
}
|
|
|
|
|
|
|
|
> span {
|
|
|
|
display: block;
|
|
|
|
|
|
|
|
// Hide the separator on small screens.
|
|
|
|
&.separator {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&,
|
|
|
|
&.separator {
|
|
|
|
@include media-breakpoint-up(md) {
|
|
|
|
display: inline-block;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-08-03 09:19:24 -07:00
|
|
|
// Global Search
|
2021-04-25 20:11:46 -07:00
|
|
|
nav.search {
|
2021-07-26 14:46:05 -07:00
|
|
|
// Don't overtake dropdowns
|
|
|
|
z-index: 999;
|
2021-08-01 21:24:22 -07:00
|
|
|
justify-content: center;
|
2021-08-02 02:18:31 -07:00
|
|
|
background-color: var(--nbx-body-bg);
|
|
|
|
|
2021-08-03 09:19:24 -07:00
|
|
|
.search-container {
|
|
|
|
display: flex;
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
@include media-breakpoint-down(lg) {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Search Input & Selected Object Value & Object Selector
|
|
|
|
.input-group {
|
|
|
|
// Selected Object
|
|
|
|
.search-obj-selected {
|
|
|
|
border-color: $input-border-color;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Object Selector Dropdown Button
|
|
|
|
.dropdown-toggle {
|
|
|
|
// Generate the same styles as a regular Bootstrap button.
|
|
|
|
@include button-variant($input-group-addon-bg, $input-border-color);
|
|
|
|
margin-left: 0;
|
|
|
|
font-weight: $input-group-addon-font-weight;
|
|
|
|
line-height: $input-line-height;
|
|
|
|
color: $input-group-addon-color;
|
|
|
|
background-color: $input-group-addon-bg;
|
|
|
|
border: $input-border-width solid $input-border-color;
|
|
|
|
@include border-radius($input-border-radius);
|
|
|
|
border-left: 1px solid var(--nbx-search-filter-border-left-color);
|
|
|
|
|
|
|
|
&:focus {
|
|
|
|
box-shadow: unset !important;
|
|
|
|
}
|
|
|
|
// Don't show the dropdown icon — the filter icon is basically the same thing.
|
|
|
|
&:after {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Object Selector Dropdown Menu
|
|
|
|
.search-obj-selector {
|
2021-08-17 11:49:32 -04:00
|
|
|
// Limit the height and enable scrolling on mobile devices.
|
|
|
|
max-height: 70vh;
|
|
|
|
overflow-y: auto;
|
2021-08-03 09:19:24 -07:00
|
|
|
|
|
|
|
.dropdown-item,
|
|
|
|
.dropdown-header {
|
|
|
|
font-size: $font-size-sm;
|
|
|
|
}
|
|
|
|
|
|
|
|
.dropdown-header {
|
|
|
|
text-transform: uppercase;
|
|
|
|
}
|
2021-05-07 11:04:57 -07:00
|
|
|
}
|
|
|
|
}
|
2021-04-25 20:11:46 -07:00
|
|
|
}
|
|
|
|
|
2021-07-26 14:46:05 -07:00
|
|
|
main.layout {
|
|
|
|
display: flex;
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
height: 100vh;
|
|
|
|
height: -webkit-fill-available;
|
|
|
|
max-height: 100vh;
|
|
|
|
overflow-x: auto;
|
|
|
|
overflow-y: hidden;
|
|
|
|
}
|
|
|
|
|
2021-03-13 02:31:46 -07:00
|
|
|
main.login-container {
|
|
|
|
display: flex;
|
2021-08-02 02:18:31 -07:00
|
|
|
flex-direction: column;
|
2021-03-13 02:31:46 -07:00
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
2021-08-02 02:18:31 -07:00
|
|
|
width: 100%;
|
|
|
|
max-width: 100vw;
|
|
|
|
height: calc(100vh - 4rem);
|
2021-03-13 02:31:46 -07:00
|
|
|
padding-top: 40px;
|
|
|
|
padding-bottom: 40px;
|
2021-05-07 11:40:20 -07:00
|
|
|
|
2021-08-02 02:18:31 -07:00
|
|
|
+ footer.footer button.color-mode-toggle {
|
2021-05-07 11:40:20 -07:00
|
|
|
color: var(--nbx-color-mode-toggle-color);
|
|
|
|
}
|
2021-03-13 02:31:46 -07:00
|
|
|
}
|
|
|
|
|
2021-07-30 00:35:38 -07:00
|
|
|
.footer {
|
2021-08-17 12:02:30 -04:00
|
|
|
padding: 0;
|
|
|
|
|
|
|
|
.nav-link {
|
|
|
|
padding: .5rem;
|
|
|
|
}
|
2021-07-30 00:35:38 -07:00
|
|
|
|
|
|
|
@include media-breakpoint-down(md) {
|
|
|
|
// Pad the bottom of the footer on mobile devices to account for mobile browser controls.
|
|
|
|
margin-bottom: 8rem;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-03-13 02:31:46 -07:00
|
|
|
footer.login-footer {
|
|
|
|
height: 4rem;
|
|
|
|
margin-top: auto;
|
|
|
|
|
|
|
|
.container-fluid {
|
|
|
|
display: flex;
|
|
|
|
justify-content: flex-end;
|
|
|
|
padding: $container-padding-x $grid-gutter-width;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-25 20:11:46 -07:00
|
|
|
h1.accordion-item-title,
|
|
|
|
h2.accordion-item-title,
|
|
|
|
h3.accordion-item-title,
|
|
|
|
h4.accordion-item-title,
|
|
|
|
h5.accordion-item-title,
|
|
|
|
h6.accordion-item-title {
|
2021-05-07 14:27:32 -07:00
|
|
|
padding: 0.25rem 0.5rem;
|
2021-08-02 02:18:31 -07:00
|
|
|
font-size: $font-size-sm;
|
2021-04-25 20:11:46 -07:00
|
|
|
font-weight: $font-weight-bold;
|
|
|
|
color: var(--nbx-sidebar-title-color);
|
2021-08-02 02:18:31 -07:00
|
|
|
text-transform: uppercase;
|
2021-04-25 20:11:46 -07:00
|
|
|
}
|
|
|
|
|
2021-03-13 02:31:46 -07:00
|
|
|
.form-login {
|
|
|
|
width: 100%;
|
|
|
|
max-width: 330px;
|
|
|
|
padding: 15px;
|
2021-08-02 02:18:31 -07:00
|
|
|
|
|
|
|
input:focus {
|
2021-05-22 16:59:55 -07:00
|
|
|
z-index: 1;
|
|
|
|
}
|
2021-03-13 02:31:46 -07:00
|
|
|
|
2021-08-02 02:18:31 -07:00
|
|
|
input[type='text'] {
|
|
|
|
margin-bottom: -1px;
|
|
|
|
border-bottom-right-radius: 0;
|
|
|
|
border-bottom-left-radius: 0;
|
|
|
|
}
|
|
|
|
input[type='password'] {
|
|
|
|
margin-bottom: 10px;
|
|
|
|
border-top-left-radius: 0;
|
|
|
|
border-top-right-radius: 0;
|
|
|
|
}
|
2021-03-13 02:31:46 -07:00
|
|
|
|
2021-08-02 02:18:31 -07:00
|
|
|
.form-control {
|
|
|
|
position: relative;
|
|
|
|
box-sizing: border-box;
|
|
|
|
height: auto;
|
|
|
|
padding: 10px;
|
|
|
|
font-size: 16px;
|
|
|
|
}
|
2021-03-13 02:31:46 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
.navbar-brand {
|
|
|
|
padding-top: 0.75rem;
|
|
|
|
padding-bottom: 0.75rem;
|
|
|
|
font-size: 1rem;
|
|
|
|
}
|
|
|
|
|
2021-04-25 20:11:46 -07:00
|
|
|
nav.nav.nav-pills {
|
|
|
|
.nav-item.nav-link {
|
|
|
|
padding: 0.25rem 0.5rem;
|
2021-05-07 14:27:32 -07:00
|
|
|
font-size: $font-size-sm;
|
2021-04-25 20:11:46 -07:00
|
|
|
border-radius: $border-radius;
|
2021-08-02 02:18:31 -07:00
|
|
|
|
2021-04-25 20:11:46 -07:00
|
|
|
&:hover {
|
2021-05-07 14:27:32 -07:00
|
|
|
color: $accordion-button-active-color;
|
2021-08-02 02:18:31 -07:00
|
|
|
background-color: $accordion-button-active-bg;
|
2021-04-25 20:11:46 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-05-22 16:59:55 -07:00
|
|
|
// Ensure the content container is full-height, and that the content block is also full height so
|
|
|
|
// that the footer is always at the bottom.
|
|
|
|
div.content-container {
|
2021-07-29 17:33:10 -07:00
|
|
|
position: relative;
|
2021-05-22 16:59:55 -07:00
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2021-08-06 17:56:38 -07:00
|
|
|
width: calc(100% - #{$sidenav-width-closed});
|
2021-08-02 02:18:31 -07:00
|
|
|
min-height: 100vh;
|
2021-07-26 14:46:05 -07:00
|
|
|
overflow-x: hidden;
|
|
|
|
overflow-y: auto;
|
2021-06-22 17:20:17 -07:00
|
|
|
|
2021-07-29 17:33:10 -07:00
|
|
|
@include media-breakpoint-down(lg) {
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
|
2021-05-22 16:59:55 -07:00
|
|
|
div.content {
|
|
|
|
flex: 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-30 15:55:37 -07:00
|
|
|
// Prevent scrolling of body content when nav menu is open on mobile.
|
2021-06-23 10:57:09 -07:00
|
|
|
.sidebar.collapse.show ~ .content-container > .content {
|
2021-04-30 15:55:37 -07:00
|
|
|
@media (max-width: map.get($grid-breakpoints, 'md')) {
|
|
|
|
position: fixed;
|
2021-06-23 10:57:09 -07:00
|
|
|
top: 0;
|
|
|
|
left: 0;
|
2021-04-30 15:55:37 -07:00
|
|
|
overflow-y: hidden;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-03-13 02:31:46 -07:00
|
|
|
.tooltip {
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
span.color-label {
|
2021-08-02 02:18:31 -07:00
|
|
|
display: block;
|
2021-03-13 02:31:46 -07:00
|
|
|
width: 5rem;
|
|
|
|
height: 1rem;
|
|
|
|
padding: $badge-padding-y $badge-padding-x;
|
2021-08-02 02:18:31 -07:00
|
|
|
border: 1px solid #303030;
|
2021-04-16 14:58:44 -07:00
|
|
|
border-radius: $border-radius;
|
2021-08-02 02:18:31 -07:00
|
|
|
box-shadow: $box-shadow-sm;
|
2021-04-16 14:58:44 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
.btn {
|
|
|
|
white-space: nowrap;
|
|
|
|
}
|
|
|
|
|
2021-03-13 02:31:46 -07:00
|
|
|
.card {
|
|
|
|
box-shadow: $box-shadow-sm;
|
2021-08-02 02:18:31 -07:00
|
|
|
|
2021-03-13 02:31:46 -07:00
|
|
|
.card-header {
|
2021-08-02 02:18:31 -07:00
|
|
|
padding: $card-cap-padding-x;
|
2021-04-26 00:31:51 -07:00
|
|
|
color: $body-color;
|
2021-03-13 02:31:46 -07:00
|
|
|
border-bottom: none;
|
|
|
|
}
|
2021-08-02 02:18:31 -07:00
|
|
|
|
2021-03-13 02:31:46 -07:00
|
|
|
.card-header + .card-body {
|
|
|
|
padding-top: 0;
|
|
|
|
}
|
2021-07-20 01:26:45 -07:00
|
|
|
|
|
|
|
.card-body.small .form-control,
|
|
|
|
.card-body.small .form-select {
|
|
|
|
font-size: $input-font-size-sm;
|
2021-04-22 18:58:36 -07:00
|
|
|
}
|
2021-08-03 08:32:53 -07:00
|
|
|
|
|
|
|
.card-divider {
|
|
|
|
width: 100%;
|
|
|
|
height: 1px;
|
|
|
|
margin: $hr-margin-y 0;
|
|
|
|
border-top: 1px solid $card-border-color;
|
|
|
|
opacity: $hr-opacity;
|
|
|
|
}
|
2021-03-13 02:31:46 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
.form-floating {
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
> .input-group > .form-control,
|
|
|
|
> .input-group > .form-select {
|
|
|
|
height: $form-floating-height;
|
|
|
|
padding: $form-floating-padding-y $form-floating-padding-x;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .input-group > label {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
height: 100%; // allow textareas
|
|
|
|
padding: $form-floating-padding-y $form-floating-padding-x;
|
|
|
|
pointer-events: none;
|
|
|
|
border: $input-border-width solid transparent; // Required for aligning label's text with the input as it affects inner box model
|
|
|
|
transform-origin: 0 0;
|
|
|
|
@include transition($form-floating-transition);
|
|
|
|
}
|
|
|
|
|
|
|
|
> .input-group > .form-control {
|
|
|
|
&::placeholder {
|
|
|
|
color: transparent;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:focus,
|
|
|
|
&:not(:placeholder-shown) {
|
|
|
|
padding-top: $form-floating-input-padding-t;
|
|
|
|
padding-bottom: $form-floating-input-padding-b;
|
|
|
|
}
|
|
|
|
// Duplicated because `:-webkit-autofill` invalidates other selectors when grouped
|
|
|
|
&:-webkit-autofill {
|
|
|
|
padding-top: $form-floating-input-padding-t;
|
|
|
|
padding-bottom: $form-floating-input-padding-b;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> .input-group > .form-select,
|
|
|
|
> .choices > .choices__inner,
|
|
|
|
> .ss-main span.placeholder, // SlimSelect Single
|
|
|
|
> .ss-main div.ss-values // SlimSelect Multiple
|
|
|
|
{
|
|
|
|
padding-top: $form-floating-input-padding-t;
|
|
|
|
padding-bottom: $form-floating-input-padding-b;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .input-group > .form-control:focus,
|
|
|
|
> .input-group > .form-control:not(:placeholder-shown),
|
|
|
|
> .input-group > .form-select,
|
|
|
|
> .choices,
|
|
|
|
> .ss-main {
|
|
|
|
~ label {
|
|
|
|
opacity: $form-floating-label-opacity;
|
|
|
|
transform: $form-floating-label-transform;
|
|
|
|
z-index: 4;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// Duplicated because `:-webkit-autofill` invalidates other selectors when grouped
|
|
|
|
> .input-group > .form-control:-webkit-autofill {
|
|
|
|
~ label {
|
2021-08-02 02:18:31 -07:00
|
|
|
z-index: 4;
|
2021-03-13 02:31:46 -07:00
|
|
|
opacity: $form-floating-label-opacity;
|
|
|
|
transform: $form-floating-label-transform;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-08-13 13:35:23 -04:00
|
|
|
.form-object-edit {
|
|
|
|
margin: 0 auto;
|
|
|
|
max-width: 800px;
|
|
|
|
}
|
|
|
|
|
2021-05-25 08:23:36 -07:00
|
|
|
textarea.form-control[rows='10'] {
|
|
|
|
height: 18rem;
|
2021-03-13 02:31:46 -07:00
|
|
|
}
|
|
|
|
|
2021-05-25 08:23:36 -07:00
|
|
|
textarea#id_local_context_data,
|
|
|
|
textarea.markdown,
|
|
|
|
textarea#id_public_key,
|
|
|
|
textarea.form-control[name='csv'],
|
|
|
|
textarea.form-control[name='data'] {
|
2021-04-18 11:36:41 -07:00
|
|
|
font-family: $font-family-monospace;
|
|
|
|
}
|
|
|
|
|
2021-03-13 02:31:46 -07:00
|
|
|
.card:not(:only-of-type) {
|
|
|
|
margin-bottom: $spacer;
|
|
|
|
}
|
|
|
|
|
|
|
|
.stat-btn {
|
|
|
|
min-width: $spacer * 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
nav.breadcrumb-container {
|
2021-08-02 02:18:31 -07:00
|
|
|
width: fit-content;
|
2021-03-13 02:31:46 -07:00
|
|
|
padding: $badge-padding-y $badge-padding-x;
|
|
|
|
font-size: $font-size-sm;
|
|
|
|
|
|
|
|
ol.breadcrumb {
|
|
|
|
margin-bottom: 0;
|
|
|
|
li.breadcrumb-item > a {
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
li.breadcrumb-item > a:hover {
|
|
|
|
text-decoration: underline;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
div.paginator > form > div.input-group {
|
|
|
|
width: fit-content;
|
|
|
|
}
|
|
|
|
|
|
|
|
div.field-group:not(:first-of-type) {
|
|
|
|
margin-top: $spacer * 3;
|
|
|
|
|
|
|
|
h1,
|
|
|
|
h2,
|
|
|
|
h3,
|
|
|
|
h4,
|
|
|
|
h5,
|
|
|
|
h6 {
|
|
|
|
margin-bottom: $spacer;
|
|
|
|
}
|
|
|
|
}
|
2021-03-14 01:06:18 -07:00
|
|
|
|
|
|
|
label.required {
|
|
|
|
font-weight: $font-weight-bold;
|
2021-08-02 02:18:31 -07:00
|
|
|
|
2021-07-30 00:35:38 -07:00
|
|
|
&:after {
|
2021-08-02 02:18:31 -07:00
|
|
|
position: absolute;
|
|
|
|
display: inline-block;
|
|
|
|
margin: 0 0 0 2px;
|
2021-04-21 13:19:46 -07:00
|
|
|
font-family: 'Material Design Icons';
|
2021-03-14 01:06:18 -07:00
|
|
|
font-size: 8px;
|
|
|
|
font-style: normal;
|
2021-08-02 02:18:31 -07:00
|
|
|
font-weight: $font-weight-medium;
|
2021-03-14 01:06:18 -07:00
|
|
|
text-decoration: none;
|
2021-08-02 02:18:31 -07:00
|
|
|
content: '\f06C4';
|
2021-03-14 01:06:18 -07:00
|
|
|
}
|
|
|
|
}
|
2021-03-14 17:31:55 -07:00
|
|
|
|
2021-07-14 17:14:00 -07:00
|
|
|
// Applied to containing element around table bulk-action buttons (bulk-edit, bulk-disconnect
|
|
|
|
// bulk-delete, etc). Each usage of .bulk-buttons needs to have groups of buttons wrapped with
|
|
|
|
// .bulk-button-group so that proper spacing is applied (even if there is only one group).
|
2021-03-14 17:31:55 -07:00
|
|
|
div.bulk-buttons {
|
|
|
|
display: flex;
|
2021-07-14 17:14:00 -07:00
|
|
|
justify-content: space-between;
|
|
|
|
margin: $spacer / 2 0;
|
2021-07-30 00:35:38 -07:00
|
|
|
|
2021-07-14 17:14:00 -07:00
|
|
|
// Each group of buttons needs to be contained separately for alignment purposes. This way, you
|
|
|
|
// can put some buttons in a group that aligns left, and other buttons in a group that aligns
|
|
|
|
// right.
|
2021-07-30 00:35:38 -07:00
|
|
|
> div.bulk-button-group {
|
2021-07-14 17:14:00 -07:00
|
|
|
display: flex;
|
2021-07-30 00:35:38 -07:00
|
|
|
flex-wrap: wrap;
|
2021-08-05 09:59:13 -07:00
|
|
|
// For small screens: don't fill the available space (thereby expanding the size of the button).
|
|
|
|
align-items: flex-start;
|
2021-07-30 00:35:38 -07:00
|
|
|
|
2021-07-14 17:14:00 -07:00
|
|
|
&:first-of-type:not(:last-of-type) {
|
|
|
|
// If there are multiple bulk button groups and this is the first, the first button in the
|
|
|
|
// group should *not* have left spacing applied, so the button group aligns with the rest
|
|
|
|
// of the page elements.
|
2021-07-30 00:35:38 -07:00
|
|
|
> *:first-child {
|
2021-07-14 17:14:00 -07:00
|
|
|
margin-left: 0;
|
|
|
|
}
|
|
|
|
}
|
2021-07-30 00:35:38 -07:00
|
|
|
|
2021-07-14 17:14:00 -07:00
|
|
|
&:last-of-type:not(:first-of-type) {
|
|
|
|
// If there are multiple bulk button groups and this is the last, the last button in the
|
|
|
|
// group should *not* have right spacing applied, so the button group aligns with the rest
|
|
|
|
// of the page elements.
|
2021-07-30 00:35:38 -07:00
|
|
|
> *:last-child {
|
2021-07-14 17:14:00 -07:00
|
|
|
margin-right: 0;
|
|
|
|
}
|
|
|
|
}
|
2021-07-30 00:35:38 -07:00
|
|
|
|
2021-07-14 17:14:00 -07:00
|
|
|
// However, the rest of the buttons should have spacing applied in all directions.
|
2021-07-30 00:35:38 -07:00
|
|
|
> * {
|
2021-07-14 17:14:00 -07:00
|
|
|
margin: $spacer / 4;
|
|
|
|
}
|
2021-03-14 17:31:55 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-25 20:11:46 -07:00
|
|
|
table tbody {
|
|
|
|
@each $color, $value in $theme-colors {
|
|
|
|
tr.#{$color} {
|
|
|
|
background-color: rgba($value, 0.15);
|
|
|
|
border-color: $gray-500;
|
|
|
|
}
|
|
|
|
}
|
2021-03-19 09:38:26 -07:00
|
|
|
}
|
2021-04-15 16:53:04 -07:00
|
|
|
|
2021-04-18 16:42:28 -07:00
|
|
|
pre.change-data {
|
|
|
|
padding-right: 0;
|
2021-08-02 02:18:31 -07:00
|
|
|
padding-left: 0;
|
|
|
|
|
|
|
|
> span {
|
2021-04-18 16:42:28 -07:00
|
|
|
display: block;
|
|
|
|
padding-right: $spacer;
|
2021-08-02 02:18:31 -07:00
|
|
|
padding-left: $spacer;
|
|
|
|
|
2021-04-18 16:42:28 -07:00
|
|
|
&.added {
|
2021-04-25 20:11:46 -07:00
|
|
|
background-color: var(--nbx-change-added);
|
2021-04-18 16:42:28 -07:00
|
|
|
}
|
2021-08-02 02:18:31 -07:00
|
|
|
|
2021-04-18 16:42:28 -07:00
|
|
|
&.removed {
|
2021-04-25 20:11:46 -07:00
|
|
|
background-color: var(--nbx-change-removed);
|
2021-04-18 16:42:28 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pre.change-diff {
|
|
|
|
border-color: transparent;
|
2021-08-02 02:18:31 -07:00
|
|
|
|
2021-04-18 16:42:28 -07:00
|
|
|
&.change-removed {
|
2021-04-25 20:11:46 -07:00
|
|
|
background-color: var(--nbx-change-removed);
|
2021-04-18 16:42:28 -07:00
|
|
|
}
|
2021-08-02 02:18:31 -07:00
|
|
|
|
2021-04-18 16:42:28 -07:00
|
|
|
&.change-added {
|
2021-04-25 20:11:46 -07:00
|
|
|
background-color: var(--nbx-change-added);
|
2021-04-18 16:42:28 -07:00
|
|
|
}
|
|
|
|
}
|
2021-04-20 01:18:24 -07:00
|
|
|
|
|
|
|
div.card-overlay {
|
|
|
|
position: absolute;
|
2021-08-02 02:18:31 -07:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
2021-04-20 01:18:24 -07:00
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
background-color: rgba($white, 0.75);
|
|
|
|
border-radius: $border-radius;
|
2021-08-02 02:18:31 -07:00
|
|
|
|
|
|
|
> div.spinner-border {
|
2021-04-20 01:18:24 -07:00
|
|
|
width: 6rem;
|
|
|
|
height: 6rem;
|
|
|
|
color: $secondary;
|
|
|
|
}
|
|
|
|
}
|
2021-04-20 12:45:30 -07:00
|
|
|
|
|
|
|
div.card > div.card-header > div.table-controls {
|
2021-05-26 16:32:09 -07:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2021-08-02 02:18:31 -07:00
|
|
|
width: 100%;
|
|
|
|
max-width: 25%;
|
|
|
|
|
|
|
|
.form-switch.form-check-inline {
|
2021-05-26 16:32:09 -07:00
|
|
|
flex: 1 0 auto;
|
|
|
|
font-size: $font-size-sm;
|
|
|
|
}
|
2021-04-20 12:45:30 -07:00
|
|
|
}
|
2021-07-21 09:24:43 -04:00
|
|
|
|
2021-07-21 15:33:07 -07:00
|
|
|
// Right-align the paginator element.
|
|
|
|
.paginator {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: flex-end;
|
|
|
|
padding: $spacer 0;
|
|
|
|
}
|
|
|
|
|
2021-07-21 09:24:43 -04:00
|
|
|
// Tabbed content
|
|
|
|
.nav-tabs {
|
2021-07-21 15:33:07 -07:00
|
|
|
.nav-link {
|
|
|
|
&:hover {
|
|
|
|
// Don't show a bottom-border on a hovered nav link because it overlaps with the .nav-tab border.
|
|
|
|
border-bottom-color: transparent;
|
|
|
|
}
|
|
|
|
&.active {
|
|
|
|
// Set the background-color of an active tab to the same color as the .tab-content
|
|
|
|
// background-color so it visually indicates which tab is open.
|
|
|
|
background-color: $tab-content-bg;
|
|
|
|
border-bottom-color: $tab-content-bg;
|
|
|
|
// Move the active tab down 1px to overtake the .nav-tabs element's border, but only for that
|
|
|
|
// tab. This is an ugly hack, but it works.
|
|
|
|
transform: translateY(1px);
|
|
|
|
}
|
2021-07-21 09:24:43 -04:00
|
|
|
}
|
|
|
|
}
|
2021-07-21 15:33:07 -07:00
|
|
|
|
2021-07-21 09:24:43 -04:00
|
|
|
.tab-content {
|
2021-07-21 15:33:07 -07:00
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2021-07-21 09:24:43 -04:00
|
|
|
padding: $spacer;
|
2021-07-21 15:33:07 -07:00
|
|
|
background-color: $tab-content-bg;
|
|
|
|
border-bottom: 1px solid $nav-tabs-border-color;
|
2021-07-21 09:24:43 -04:00
|
|
|
}
|
2021-07-24 00:38:28 -07:00
|
|
|
|
2021-08-01 13:30:16 -07:00
|
|
|
#django-messages {
|
|
|
|
position: fixed;
|
|
|
|
right: $spacer;
|
|
|
|
bottom: 0;
|
|
|
|
margin: $spacer;
|
|
|
|
}
|
|
|
|
|
2021-07-24 17:08:18 -07:00
|
|
|
// Page-specific styles.
|
|
|
|
html {
|
|
|
|
// Shade the home page content background-color.
|
2021-07-24 00:38:28 -07:00
|
|
|
&[data-netbox-path='/'] {
|
|
|
|
.content-container,
|
2021-07-29 17:33:10 -07:00
|
|
|
.search {
|
2021-07-26 14:46:05 -07:00
|
|
|
background-color: $gray-100 !important;
|
2021-07-24 00:38:28 -07:00
|
|
|
}
|
|
|
|
&[data-netbox-color-mode='dark'] {
|
|
|
|
.content-container,
|
2021-07-29 17:33:10 -07:00
|
|
|
.search {
|
2021-07-26 14:46:05 -07:00
|
|
|
background-color: $darkest !important;
|
2021-07-24 00:38:28 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-07-24 17:08:18 -07:00
|
|
|
|
|
|
|
// Don't show the django-messages toasts on the login screen in favor of the alert component.
|
|
|
|
&[data-netbox-path*='/login'] {
|
|
|
|
#django-messages {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
2021-07-24 00:38:28 -07:00
|
|
|
}
|