netbox.scss 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876
  1. // Netbox-specific Styles and Overrides.
  2. @use 'sass:map';
  3. :root {
  4. --nbx-sidebar-bg: #{$gray-100};
  5. --nbx-sidebar-link-color: #{$gray-800};
  6. --nbx-sidebar-link-hover-bg: #{$blue-100};
  7. --nbx-sidebar-title-color: #{$text-muted};
  8. --nbx-sidebar-shadow: inset 0px -25px 20px -25px rgba(0, 0, 0, 0.25);
  9. --nbx-breadcrumb-bg: #{$light};
  10. --nbx-body-bg: #{$white};
  11. --nbx-body-color: #{$gray-800};
  12. --nbx-pre-bg: #{$gray-100};
  13. --nbx-pre-border-color: #{$gray-600};
  14. --nbx-change-added: #{rgba($green, 0.4)};
  15. --nbx-change-removed: #{rgba($red, 0.4)};
  16. --nbx-cable-node-bg: #{$gray-100};
  17. --nbx-cable-node-border-color: #{$gray-200};
  18. --nbx-cable-termination-bg: #{$gray-200};
  19. --nbx-cable-termination-border-color: #{$gray-300};
  20. --nbx-search-filter-border-left-color: #{$gray-300};
  21. --nbx-color-mode-toggle-color: #{$primary};
  22. body[data-netbox-color-mode='dark'] {
  23. --nbx-sidebar-bg: #{$gray-900};
  24. --nbx-sidebar-link-color: #{$gray-200};
  25. --nbx-sidebar-link-hover-bg: #{rgba($blue-300, 0.15)};
  26. --nbx-sidebar-title-color: #{$gray-600};
  27. --nbx-sidebar-shadow: inset 0px -25px 20px -25px rgba(255, 255, 255, 0.05);
  28. --nbx-breadcrumb-bg: #{$gray-800};
  29. --nbx-body-bg: #1b1f22;
  30. --nbx-body-color: #{$gray-100};
  31. --nbx-pre-bg: #{$gray-700};
  32. --nbx-pre-border-color: #{$gray-600};
  33. --nbx-change-added: #{rgba($green-300, 0.4)};
  34. --nbx-change-removed: #{rgba($red-300, 0.4)};
  35. --nbx-cable-node-bg: #{$gray-700};
  36. --nbx-cable-node-border-color: #{$gray-600};
  37. --nbx-cable-termination-bg: #{$gray-800};
  38. --nbx-cable-termination-border-color: #{$gray-700};
  39. --nbx-search-filter-border-left-color: #{$gray-600};
  40. --nbx-color-mode-toggle-color: #{$yellow-300};
  41. }
  42. }
  43. * {
  44. transition: background-color, color 0.15s ease-in-out;
  45. }
  46. .mw-25 {
  47. max-width: 25% !important;
  48. }
  49. .mw-33 {
  50. max-width: 33.33% !important;
  51. }
  52. .mw-50 {
  53. max-width: 50% !important;
  54. }
  55. .mw-66 {
  56. max-width: 66.66% !important;
  57. }
  58. .mw-75 {
  59. max-width: 75% !important;
  60. }
  61. .text-xs {
  62. font-size: $font-size-xs;
  63. line-height: $line-height-sm;
  64. }
  65. .opacity-0 {
  66. opacity: 0 !important;
  67. }
  68. .opacity-25 {
  69. opacity: 0.25 !important;
  70. }
  71. .opacity-50 {
  72. opacity: 0.5 !important;
  73. }
  74. .opacity-75 {
  75. opacity: 0.75 !important;
  76. }
  77. .opacity-100 {
  78. opacity: 1 !important;
  79. }
  80. // Automatically space out adjacent columns.
  81. .col:not(:last-child):not(:only-child) {
  82. margin-bottom: $spacer;
  83. }
  84. *[data-href] {
  85. cursor: pointer;
  86. }
  87. // Use proper contrasting color foreground color for special components.
  88. @each $color, $value in $theme-colors {
  89. .badge,
  90. .toast,
  91. .progress-bar {
  92. &.bg-#{$color} {
  93. color: color-contrast($value);
  94. }
  95. }
  96. // Use proper foreground color in the alert body. Note: this is applied to a, p, & small because
  97. // we *don't* want to override the h1-h6 colors for alerts, since those are set to a color
  98. // similar to the alert color.
  99. .alert.alert-#{$color} {
  100. a,
  101. p,
  102. small {
  103. color: color-contrast($value);
  104. }
  105. }
  106. }
  107. // Ensure progress bars (utilization graph) in tables aren't too narrow to display the percentage.
  108. table td > .progress {
  109. min-width: 6rem;
  110. }
  111. .card > .table.table-flush {
  112. margin-bottom: 0;
  113. overflow: hidden;
  114. border-bottom-right-radius: $card-border-radius;
  115. border-bottom-left-radius: $card-border-radius;
  116. thead th[scope='col'] {
  117. background-color: $table-flush-header-bg;
  118. vertical-align: middle;
  119. text-transform: uppercase;
  120. padding-top: map.get($spacers, 3);
  121. padding-bottom: map.get($spacers, 3);
  122. border-bottom-color: $card-border-color;
  123. border-top: 1px solid $card-border-color;
  124. }
  125. th,
  126. td {
  127. border-left: 0;
  128. border-right: 0;
  129. padding-left: map.get($spacers, 4) !important;
  130. padding-right: map.get($spacers, 4) !important;
  131. }
  132. tr[class] {
  133. border-color: $card-border-color !important;
  134. &:last-of-type {
  135. border-bottom-color: transparent !important;
  136. border-bottom-right-radius: $card-border-radius;
  137. border-bottom-left-radius: $card-border-radius;
  138. }
  139. }
  140. }
  141. // Primarily used for the new release notification, but could be used for other alerts as needed.
  142. // Wrap any alerts in .header-alert-container to ensure the layout is consistent.
  143. .header-alert-container {
  144. // Center-align the alert(s).
  145. display: flex;
  146. justify-content: center;
  147. align-items: center;
  148. // Apply the same spacing that's applied to the #content div's first child (.px-3).
  149. padding: 0 $spacer;
  150. // By default, alerts inside .header-alert-container should take up the full width.
  151. .alert {
  152. width: 100%;
  153. // Adjust the max-width for larger screens so there's not a big ugly blue blob taking up the
  154. // entire screen.
  155. @include media-breakpoint-up(md) {
  156. max-width: 75%;
  157. }
  158. @include media-breakpoint-up(lg) {
  159. max-width: 50%;
  160. }
  161. }
  162. }
  163. span.profile-button .dropdown-menu {
  164. transition: opacity 0.2s ease-in-out;
  165. display: block !important;
  166. right: 0;
  167. left: auto;
  168. margin-top: 0.5rem;
  169. box-shadow: $box-shadow;
  170. &:not(.show) {
  171. opacity: 0;
  172. pointer-events: none;
  173. }
  174. &.show {
  175. opacity: 1;
  176. pointer-events: auto;
  177. }
  178. }
  179. div#advanced-search-content div.card div.card-body div.col:not(:last-child) {
  180. margin-right: 1rem;
  181. }
  182. body {
  183. background-color: var(--nbx-body-bg);
  184. color: var(--nbx-body-color);
  185. g#netbox-logo-1 {
  186. fill: #9cc8f8;
  187. stroke: #9cc8f8;
  188. }
  189. g#netbox-logo-2 {
  190. fill: #1685fc;
  191. stroke: #1685fc;
  192. }
  193. &[data-netbox-color-mode='light'] {
  194. .btn.btn-primary,
  195. .progress-bar.bg-primary,
  196. .badge.bg-primary,
  197. .nav.nav-pills .nav-item.nav-link.active,
  198. .nav.nav-pills .nav-item .nav-link.active,
  199. .nav.nav-pills .nav-item .show > .nav-link {
  200. color: $gray-100;
  201. }
  202. }
  203. &[data-netbox-color-mode='dark'] {
  204. & {
  205. .btn.btn-primary,
  206. .progress-bar.bg-primary,
  207. .badge.bg-primary,
  208. .nav.nav-pills .nav-item.nav-link.active,
  209. .nav.nav-pills .nav-item .nav-link.active,
  210. .nav.nav-pills .nav-item .show > .nav-link {
  211. color: $black;
  212. }
  213. }
  214. .card table caption {
  215. color: $gray-300;
  216. }
  217. .breadcrumb .breadcrumb-item > a {
  218. color: $blue-200;
  219. &:hover {
  220. color: $blue-100;
  221. }
  222. }
  223. .card,
  224. .sidebar {
  225. .text-muted {
  226. color: $gray-400 !important;
  227. }
  228. }
  229. .text-body[class] {
  230. color: var(--nbx-body-color) !important;
  231. }
  232. g#netbox-logo-1 {
  233. fill: $white;
  234. stroke: $white;
  235. }
  236. g#netbox-logo-2 {
  237. fill: $gray-200;
  238. stroke: $gray-200;
  239. }
  240. }
  241. & table,
  242. &[data-netbox-color-mode] table {
  243. a {
  244. text-decoration: none;
  245. &:hover {
  246. text-decoration: underline;
  247. }
  248. }
  249. &.table > :not(caption) > * > * {
  250. padding-left: $table-cell-padding-x-sm !important;
  251. padding-right: $table-cell-padding-x-sm !important;
  252. }
  253. td,
  254. th {
  255. font-size: $font-size-xs;
  256. line-height: $line-height-sm;
  257. vertical-align: middle;
  258. & input.form-check-input {
  259. // Ensure checkboxes aren't too small inside object tables.
  260. font-size: $font-size-base;
  261. }
  262. & .btn-sm {
  263. line-height: $line-height-xs;
  264. }
  265. }
  266. &.attr-table {
  267. td,
  268. th {
  269. font-size: $font-size-sm;
  270. line-height: $line-height-sm;
  271. }
  272. }
  273. }
  274. }
  275. div.title-container {
  276. display: flex;
  277. justify-content: space-between;
  278. flex-wrap: wrap;
  279. align-items: center;
  280. div#content-title {
  281. display: flex;
  282. flex-direction: column;
  283. flex: 1 0 auto;
  284. padding-bottom: map.get($spacers, 2);
  285. }
  286. }
  287. nav.search {
  288. background-color: var(--nbx-body-bg);
  289. form button.dropdown-toggle {
  290. border-color: $input-border-color;
  291. font-weight: $input-group-addon-font-weight;
  292. line-height: $input-line-height;
  293. color: $input-group-addon-color;
  294. background-color: $input-group-addon-bg;
  295. border: $input-border-width solid $input-group-addon-border-color;
  296. @include border-radius($input-border-radius);
  297. border-left: 1px solid var(--nbx-search-filter-border-left-color);
  298. &:focus {
  299. box-shadow: unset !important;
  300. }
  301. }
  302. }
  303. main.login-container {
  304. display: flex;
  305. height: calc(100vh - 4rem);
  306. width: 100%;
  307. max-width: 100vw;
  308. align-items: center;
  309. justify-content: center;
  310. flex-direction: column;
  311. padding-top: 40px;
  312. padding-bottom: 40px;
  313. & + footer.footer button.color-mode-toggle {
  314. color: var(--nbx-color-mode-toggle-color);
  315. }
  316. }
  317. footer.login-footer {
  318. height: 4rem;
  319. margin-top: auto;
  320. .container-fluid {
  321. display: flex;
  322. justify-content: flex-end;
  323. padding: $container-padding-x $grid-gutter-width;
  324. }
  325. }
  326. h1 {
  327. font-weight: $font-weight-bolder;
  328. }
  329. h2 {
  330. font-weight: $font-weight-bold;
  331. }
  332. h3,
  333. h4 {
  334. font-weight: $font-weight-medium;
  335. }
  336. h5,
  337. h6 {
  338. font-weight: $font-weight-medium;
  339. }
  340. h1.accordion-item-title,
  341. h2.accordion-item-title,
  342. h3.accordion-item-title,
  343. h4.accordion-item-title,
  344. h5.accordion-item-title,
  345. h6.accordion-item-title {
  346. // padding: 0 0.5rem;
  347. padding: 0.25rem 0.5rem;
  348. font-weight: $font-weight-bold;
  349. text-transform: uppercase;
  350. color: var(--nbx-sidebar-title-color);
  351. font-size: $font-size-sm;
  352. }
  353. .form-login {
  354. width: 100%;
  355. max-width: 330px;
  356. padding: 15px;
  357. & input:focus {
  358. z-index: 1;
  359. }
  360. }
  361. .form-login input[type='text'] {
  362. margin-bottom: -1px;
  363. border-bottom-left-radius: 0;
  364. border-bottom-right-radius: 0;
  365. }
  366. .form-login input[type='password'] {
  367. margin-bottom: 10px;
  368. border-top-left-radius: 0;
  369. border-top-right-radius: 0;
  370. }
  371. .form-login .form-control {
  372. position: relative;
  373. box-sizing: border-box;
  374. height: auto;
  375. padding: 10px;
  376. font-size: 16px;
  377. }
  378. li.dropdown-item.dropdown-item-btns {
  379. display: flex;
  380. justify-content: space-between;
  381. align-items: center;
  382. }
  383. .sidebar-sticky {
  384. position: relative;
  385. top: 0;
  386. height: calc(100vh - 48px);
  387. padding-top: 0.5rem;
  388. overflow-x: hidden;
  389. overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
  390. }
  391. .navbar-brand {
  392. padding-top: 0.75rem;
  393. padding-bottom: 0.75rem;
  394. font-size: 1rem;
  395. }
  396. nav.nav.nav-pills {
  397. .nav-item.nav-link {
  398. padding: 0.25rem 0.5rem;
  399. font-size: $font-size-sm;
  400. border-radius: $border-radius;
  401. &:hover {
  402. background-color: $accordion-button-active-bg;
  403. color: $accordion-button-active-color;
  404. }
  405. }
  406. }
  407. // Ensure the content container is full-height, and that the content block is also full height so
  408. // that the footer is always at the bottom.
  409. div.content-container {
  410. min-height: 100vh;
  411. display: flex;
  412. flex-direction: column;
  413. overflow: hidden;
  414. @include media-breakpoint-up(md) {
  415. margin-left: $sidebar-width;
  416. }
  417. div.content {
  418. flex: 1;
  419. }
  420. }
  421. // Prevent scrolling of body content when nav menu is open on mobile.
  422. .sidebar.collapse.show ~ .content-container > .content {
  423. @media (max-width: map.get($grid-breakpoints, 'md')) {
  424. position: fixed;
  425. top: 0;
  426. left: 0;
  427. overflow-y: hidden;
  428. }
  429. }
  430. .sidebar {
  431. position: fixed;
  432. top: 0;
  433. bottom: 0;
  434. left: 0;
  435. z-index: 100; /* Behind the navbar */
  436. border-right: 1px solid $border-color;
  437. background-color: var(--nbx-sidebar-bg);
  438. max-height: 100%;
  439. width: 100%;
  440. @include media-breakpoint-up(md) {
  441. width: 100%;
  442. max-width: $sidebar-width;
  443. }
  444. @include media-breakpoint-down(md) {
  445. top: 8.125rem;
  446. background-color: var(--nbx-body-bg);
  447. }
  448. div.accordion-item {
  449. border: unset;
  450. padding: 0 $spacer / 2;
  451. // When an sidenav section is open, apply a shadow to provide a visual border.
  452. &.is-open {
  453. box-shadow: var(--nbx-sidebar-shadow);
  454. }
  455. & > a.accordion-button {
  456. &:not(.collapsed) {
  457. box-shadow: unset;
  458. }
  459. &.nav-link {
  460. border-radius: $border-radius;
  461. &:hover {
  462. color: $accordion-button-active-color;
  463. background-color: $accordion-button-active-bg;
  464. }
  465. &:focus {
  466. border-color: unset;
  467. box-shadow: unset;
  468. }
  469. }
  470. }
  471. }
  472. .accordion-body {
  473. max-height: calc(100vh - 24rem);
  474. overflow-y: auto;
  475. .nav-item {
  476. .nav-link {
  477. padding: 0.25rem 0.6rem;
  478. font-size: $font-size-sm;
  479. border-radius: $border-radius;
  480. &:hover {
  481. color: $accordion-button-active-color;
  482. background-color: $accordion-button-active-bg;
  483. }
  484. }
  485. }
  486. }
  487. // Ensure navigation accounts for the height of the header on mobile when nav is expanded.
  488. &.collapse.show div.position-sticky {
  489. @media (max-width: map.get($grid-breakpoints, 'md')) {
  490. height: calc(100vh - 16.125rem);
  491. overflow-y: auto;
  492. }
  493. }
  494. div.position-sticky {
  495. height: calc(100vh - #{$sidebar-bottom-height});
  496. }
  497. div.sidebar-bottom {
  498. padding-left: 0.5rem;
  499. padding-right: 0.5rem;
  500. position: sticky;
  501. height: $sidebar-bottom-height;
  502. background-color: var(--nbx-sidebar-bg);
  503. @include media-breakpoint-down(md) {
  504. background-color: var(--nbx-body-bg);
  505. }
  506. .nav {
  507. padding: 0 1.25rem;
  508. justify-content: space-between;
  509. margin: $spacer/2 0;
  510. .nav-link {
  511. padding: 0.5rem 0.25rem;
  512. }
  513. }
  514. }
  515. a.sidebar-logo {
  516. display: flex;
  517. flex-shrink: 1;
  518. width: 100%;
  519. height: 4rem;
  520. }
  521. }
  522. .tooltip {
  523. pointer-events: none;
  524. }
  525. .ws-nowrap {
  526. white-space: nowrap !important;
  527. }
  528. .search-obj-selector {
  529. .dropdown-item,
  530. .dropdown-header {
  531. font-size: $font-size-sm;
  532. }
  533. .dropdown-header {
  534. text-transform: uppercase;
  535. }
  536. }
  537. span.color-label {
  538. width: 5rem;
  539. height: 1rem;
  540. display: block;
  541. box-shadow: $box-shadow-sm;
  542. border-radius: $border-radius;
  543. padding: $badge-padding-y $badge-padding-x;
  544. }
  545. pre {
  546. border-radius: $border-radius;
  547. border: 1px solid var(--nbx-pre-border-color);
  548. background-color: var(--nbx-pre-bg);
  549. padding: $spacer;
  550. white-space: pre;
  551. }
  552. .btn {
  553. white-space: nowrap;
  554. }
  555. .card {
  556. box-shadow: $box-shadow-sm;
  557. .card-header {
  558. color: $body-color;
  559. border-bottom: none;
  560. padding: $card-cap-padding-x;
  561. }
  562. .card-header + .card-body {
  563. padding-top: 0;
  564. }
  565. .card-body {
  566. overflow-x: auto;
  567. }
  568. }
  569. .form-floating {
  570. position: relative;
  571. > .input-group > .form-control,
  572. > .input-group > .form-select {
  573. height: $form-floating-height;
  574. padding: $form-floating-padding-y $form-floating-padding-x;
  575. }
  576. > .input-group > label {
  577. position: absolute;
  578. top: 0;
  579. left: 0;
  580. height: 100%; // allow textareas
  581. padding: $form-floating-padding-y $form-floating-padding-x;
  582. pointer-events: none;
  583. border: $input-border-width solid transparent; // Required for aligning label's text with the input as it affects inner box model
  584. transform-origin: 0 0;
  585. @include transition($form-floating-transition);
  586. }
  587. > .input-group > .form-control {
  588. &::placeholder {
  589. color: transparent;
  590. }
  591. &:focus,
  592. &:not(:placeholder-shown) {
  593. padding-top: $form-floating-input-padding-t;
  594. padding-bottom: $form-floating-input-padding-b;
  595. }
  596. // Duplicated because `:-webkit-autofill` invalidates other selectors when grouped
  597. &:-webkit-autofill {
  598. padding-top: $form-floating-input-padding-t;
  599. padding-bottom: $form-floating-input-padding-b;
  600. }
  601. }
  602. > .input-group > .form-select,
  603. > .choices > .choices__inner,
  604. > .ss-main span.placeholder, // SlimSelect Single
  605. > .ss-main div.ss-values // SlimSelect Multiple
  606. {
  607. padding-top: $form-floating-input-padding-t;
  608. padding-bottom: $form-floating-input-padding-b;
  609. }
  610. > .input-group > .form-control:focus,
  611. > .input-group > .form-control:not(:placeholder-shown),
  612. > .input-group > .form-select,
  613. > .choices,
  614. > .ss-main {
  615. ~ label {
  616. opacity: $form-floating-label-opacity;
  617. transform: $form-floating-label-transform;
  618. z-index: 4;
  619. }
  620. }
  621. // Duplicated because `:-webkit-autofill` invalidates other selectors when grouped
  622. > .input-group > .form-control:-webkit-autofill {
  623. ~ label {
  624. opacity: $form-floating-label-opacity;
  625. transform: $form-floating-label-transform;
  626. z-index: 4;
  627. }
  628. }
  629. }
  630. textarea.form-control[rows='10'] {
  631. height: 18rem;
  632. }
  633. textarea#id_local_context_data,
  634. textarea.markdown,
  635. textarea#id_public_key,
  636. textarea.form-control[name='csv'],
  637. textarea.form-control[name='data'] {
  638. font-family: $font-family-monospace;
  639. }
  640. table tr.vertical-align {
  641. vertical-align: middle;
  642. }
  643. .card:not(:only-of-type) {
  644. margin-bottom: $spacer;
  645. }
  646. .stat-btn {
  647. min-width: $spacer * 3;
  648. }
  649. nav.breadcrumb-container {
  650. padding: $badge-padding-y $badge-padding-x;
  651. font-size: $font-size-sm;
  652. width: fit-content;
  653. ol.breadcrumb {
  654. margin-bottom: 0;
  655. li.breadcrumb-item > a {
  656. text-decoration: none;
  657. }
  658. li.breadcrumb-item > a:hover {
  659. text-decoration: underline;
  660. }
  661. }
  662. }
  663. div.paginator > form > div.input-group {
  664. width: fit-content;
  665. }
  666. div.field-group:not(:first-of-type) {
  667. margin-top: $spacer * 3;
  668. h1,
  669. h2,
  670. h3,
  671. h4,
  672. h5,
  673. h6 {
  674. margin-bottom: $spacer;
  675. }
  676. }
  677. label.required {
  678. font-weight: $font-weight-bold;
  679. &::after {
  680. font-family: 'Material Design Icons';
  681. content: '\f06C4';
  682. font-weight: normal;
  683. font-size: 8px;
  684. font-style: normal;
  685. margin: 0 0 0 2px;
  686. text-decoration: none;
  687. display: inline-block;
  688. position: absolute;
  689. }
  690. }
  691. // Applied to containing element around table bulk-action buttons (bulk-edit, bulk-disconnect
  692. // bulk-delete, etc). Each usage of .bulk-buttons needs to have groups of buttons wrapped with
  693. // .bulk-button-group so that proper spacing is applied (even if there is only one group).
  694. div.bulk-buttons {
  695. display: flex;
  696. justify-content: space-between;
  697. margin: $spacer / 2 0;
  698. // Each group of buttons needs to be contained separately for alignment purposes. This way, you
  699. // can put some buttons in a group that aligns left, and other buttons in a group that aligns
  700. // right.
  701. & > div.bulk-button-group {
  702. display: flex;
  703. &:first-of-type:not(:last-of-type) {
  704. // If there are multiple bulk button groups and this is the first, the first button in the
  705. // group should *not* have left spacing applied, so the button group aligns with the rest
  706. // of the page elements.
  707. & > *:first-child {
  708. margin-left: 0;
  709. }
  710. }
  711. &:last-of-type:not(:first-of-type) {
  712. // If there are multiple bulk button groups and this is the last, the last button in the
  713. // group should *not* have right spacing applied, so the button group aligns with the rest
  714. // of the page elements.
  715. & > *:last-child {
  716. margin-right: 0;
  717. }
  718. }
  719. // However, the rest of the buttons should have spacing applied in all directions.
  720. & > * {
  721. margin: $spacer / 4;
  722. }
  723. }
  724. }
  725. i.bi-plus:before,
  726. span.bi-plus:before {
  727. font-weight: $font-weight-bold !important;
  728. }
  729. table tbody {
  730. @each $color, $value in $theme-colors {
  731. tr.#{$color} {
  732. background-color: rgba($value, 0.15);
  733. border-color: $gray-500;
  734. }
  735. }
  736. }
  737. pre.change-data {
  738. padding-left: 0;
  739. padding-right: 0;
  740. & > span {
  741. display: block;
  742. padding-left: $spacer;
  743. padding-right: $spacer;
  744. &.added {
  745. background-color: var(--nbx-change-added);
  746. }
  747. &.removed {
  748. background-color: var(--nbx-change-removed);
  749. }
  750. }
  751. }
  752. pre.change-diff {
  753. border-color: transparent;
  754. &.change-removed {
  755. background-color: var(--nbx-change-removed);
  756. }
  757. &.change-added {
  758. background-color: var(--nbx-change-added);
  759. }
  760. }
  761. div.card-overlay {
  762. position: absolute;
  763. width: 100%;
  764. height: 100%;
  765. background-color: rgba($white, 0.75);
  766. border-radius: $border-radius;
  767. display: flex;
  768. justify-content: center;
  769. align-items: center;
  770. & > div.spinner-border {
  771. width: 6rem;
  772. height: 6rem;
  773. color: $secondary;
  774. }
  775. }
  776. div.card > div.card-header > div.table-controls {
  777. max-width: 25%;
  778. width: 100%;
  779. display: flex;
  780. align-items: center;
  781. & .form-switch.form-check-inline {
  782. flex: 1 0 auto;
  783. font-size: $font-size-sm;
  784. }
  785. }