_misc.scss 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. @use 'sass:map';
  2. // Color labels
  3. span.color-label {
  4. display: inline-block;
  5. width: 5rem;
  6. height: 1rem;
  7. padding: $badge-padding-y $badge-padding-x;
  8. border: 1px solid #303030;
  9. border-radius: $border-radius;
  10. }
  11. // Object hierarchy depth indicators
  12. .record-depth {
  13. display: inline;
  14. user-select: none;
  15. opacity: 33%;
  16. // Add spacing to the last or only dot.
  17. span:only-of-type,
  18. span:last-of-type {
  19. margin-right: map.get($spacers, 1);
  20. }
  21. }
  22. // Hides the last child of an element
  23. .hide-last-child :last-child {
  24. visibility: hidden;
  25. opacity: 0;
  26. }
  27. // NetBox edition text
  28. .netbox-edition {
  29. letter-spacing: .15rem;
  30. }
  31. // A floating div for form buttons
  32. .btn-float-group {
  33. position: sticky;
  34. bottom: 10px;
  35. z-index: 4;
  36. }
  37. .btn-float-group-left {
  38. @extend .btn-float-group;
  39. float: left;
  40. }
  41. .btn-float-group-right {
  42. @extend .btn-float-group;
  43. float: right;
  44. }
  45. // Override a transparent background
  46. .btn-float {
  47. --tblr-btn-bg: var(--#{$prefix}bg-surface-tertiary) !important;
  48. }
  49. .logo {
  50. height: 80px;
  51. }
  52. .sso-icon {
  53. height: 24px;
  54. }
  55. .btn-white {
  56. @extend .btn-light;
  57. }
  58. .btn-black {
  59. @extend .btn-dark;
  60. }
  61. .btn-grey, .btn-gray {
  62. @extend .btn-secondary;
  63. }
  64. img.plugin-icon {
  65. max-width: 1.4285em;
  66. height: auto;
  67. }
  68. // Image attachment thumbnails
  69. .thumbnail {
  70. max-width: 200px;
  71. img {
  72. border: 1px solid #606060;
  73. }
  74. }
  75. // Image preview popover (rendered for <a.image-preview> by initImagePreview())
  76. .image-preview-popover {
  77. --bs-popover-max-width: clamp(240px, 25vw, 640px);
  78. .popover-header {
  79. overflow: hidden;
  80. text-overflow: ellipsis;
  81. white-space: nowrap;
  82. }
  83. .popover-body {
  84. display: flex;
  85. justify-content: center;
  86. align-items: center;
  87. }
  88. img {
  89. display: block;
  90. max-width: 100%;
  91. max-height: clamp(160px, 33vh, 640px);
  92. height: auto;
  93. }
  94. }
  95. html[data-bs-theme=dark] {
  96. // Assuming icon is black/white line art, invert it and tone down brightness
  97. img.plugin-icon {
  98. filter: grayscale(100%) invert(100%) brightness(80%);
  99. }
  100. }