AlexTheTrain1

overlay.css

Sep 27th, 2025 (edited)
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 7.29 KB | None | 0 0
  1. /* @since 0.5.1 */
  2.  
  3. /* The entire overlay */
  4. #bm-overlay, #bm-overlay-telemetry {
  5.   position: fixed;
  6.   background-color: rgba(21, 48, 99, 0.9);
  7.   color: white;
  8.   padding: 10px;
  9.   border-radius: 8px;
  10.   z-index: 9000;
  11.   transition: all 0.3s ease, transform 0s;
  12.   max-width: 390px !important;
  13.   width: 390px !important;
  14.   /* Performance optimizations for smooth dragging */
  15.   will-change: transform;
  16.   backface-visibility: hidden;
  17.   -webkit-backface-visibility: hidden;
  18.   transform-style: preserve-3d;
  19.   -webkit-transform-style: preserve-3d;
  20. }
  21.  
  22. /* Smooth transitions for minimize/maximize functionality */
  23. #bm-contain-userinfo,
  24. #bm-overlay hr, #bm-overlay-telemetry hr,
  25. #bm-contain-automation,
  26. #bm-contain-buttons-action {
  27.   transition: opacity 0.2s ease, height 0.2s ease;
  28. }
  29.  
  30. /* The entire overlay BUT it is cascading */
  31. div#bm-overlay, div#bm-overlay-telemetry {
  32.   /* Font stack is as follows:
  33.    * Highest Priority (Roboto Mono)
  34.    * Windows fallback (Courier New)
  35.    * macOS fallback (Monaco)
  36.    * Linux fallback (DejaVu Sans Mono)
  37.    * Any possible monospace font (monospace)
  38.    * Last resort (Arial) */
  39.   font-family: 'Roboto Mono', 'Courier New', 'Monaco', 'DejaVu Sans Mono', monospace, 'Arial';
  40.   letter-spacing: 0.05em;
  41. }
  42.  
  43. /* The drag bar */
  44. #bm-bar-drag, #bm-bar-drag-telemetry {
  45.   margin-bottom: 0.5em;
  46.   /* For background circles, width & height should be odd, cx & cy should be half of width & height, and r should be less than or equal to cx & cy */
  47.   background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="5" height="5"><circle cx="3" cy="3" r="1.5" fill="CornflowerBlue" /></svg>') repeat;
  48.   cursor: grab;
  49.   width: 100%;
  50.   height: 1em;
  51. }
  52.  
  53. /* When the overlay is being dragged */
  54. #bm-bar-drag.dragging, #bm-bar-drag-telemetry.dragging {
  55.   cursor: grabbing;
  56. }
  57.  
  58. /* Disable interactions during drag for better performance */
  59. #bm-overlay:has(#bm-bar-drag.dragging), #bm-overlay-telemetry:has(#bm-bar-drag-telemetry.dragging) {
  60.   pointer-events: none;
  61.   user-select: none;
  62.   -webkit-user-select: none;
  63.   -moz-user-select: none;
  64.   -ms-user-select: none;
  65. }
  66.  
  67. /* Keep drag bar interactive when dragging */
  68. #bm-bar-drag.dragging, #bm-bar-drag-telemetry.dragging {
  69.   pointer-events: auto;
  70. }
  71.  
  72. /* The container for the overlay header */
  73. #bm-contain-header, #bm-contain-header-telemetry {
  74.   margin-bottom: 0.5em;
  75. }
  76.  
  77. /* When minimized, adjust header container */
  78. #bm-contain-header[style*="text-align: center"], #bm-contain-header-telemetry[style*="text-align: center"] {
  79.   display: flex;
  80.   flex-direction: column;
  81.   align-items: center;
  82.   justify-content: center;
  83. }
  84.  
  85. /* Ensure overlay maintains consistent width when minimized */
  86. #bm-overlay[style*="padding: 5px"], #bm-overlay-telemetry[style*="padding: 5px"] {
  87.   width: auto !important;
  88.   max-width: 450px;
  89.   min-width: 200px;
  90. }
  91.  
  92. /* The Blue Marble image */
  93. #bm-overlay img {
  94.   display: inline-block;
  95.   height: 2.5em;
  96.   margin-right: 1ch;
  97.   vertical-align: middle;
  98.   transition: opacity 0.2s ease;
  99. }
  100.  
  101. /* When overlay is minimized, adjust image styling */
  102. #bm-contain-header[style*="text-align: center"] img {
  103.   margin-right: 0;
  104.   margin-left: 0;
  105.   display: block;
  106.   margin: 0 auto;
  107. }
  108.  
  109. /* Ensure drag bar remains functional when minimized */
  110. #bm-bar-drag, #bm-bar-drag-telemetry {
  111.   transition: margin-bottom 0.2s ease;
  112. }
  113.  
  114. /* The Blue Marble header */
  115. #bm-overlay h1, #bm-overlay-telemetry h1 {
  116.   display: inline-block;
  117.   font-size: x-large;
  118.   font-weight: bold;
  119.   vertical-align: middle;
  120. }
  121.  
  122. /* Checkboxes in the automation container */
  123. #bm-contain-automation input[type="checkbox"] {
  124.   vertical-align: middle;
  125.   margin-right: 0.5ch;
  126. }
  127.  
  128. /* Checkbox label/flavor text in the automation container */
  129. #bm-contain-automation label {
  130.   margin-right: 0.5ch;
  131. }
  132.  
  133. /* Question Mark button */
  134. .bm-help {
  135.   border: white 1px solid;
  136.   height: 1.5em;
  137.   width: 1.5em;
  138.   margin-top: 2px;
  139.   text-align: center;
  140.   line-height: 1em;
  141.   padding: 0 !important; /* Overrides the padding in "#bm-overlay button" */
  142. }
  143.  
  144. /* Pin button */
  145. #bm-button-coords {
  146.   vertical-align: middle;
  147. }
  148.  
  149. /* Pin button image*/
  150. #bm-button-coords svg {
  151.   width: 50%;
  152.   margin: 0 auto;
  153.   fill: #111;
  154. }
  155.  
  156. /* Container for action buttons, that is inside the action button container */
  157. div:has(> #bm-button-teleport) {
  158.   display: flex;
  159.   gap: 0.5ch;
  160. }
  161.  
  162. /* Favorite (Star) button image */
  163. /* Templates (Person) button image */
  164. #bm-button-favorite svg,
  165. #bm-button-template svg {
  166.   height: 1em;
  167.   margin: 0 auto;
  168.   margin-top: 2px;
  169.   text-align: center;
  170.   line-height: 1em;
  171.   vertical-align: bottom;
  172. }
  173.  
  174. /* Tile (x, y) & Pixel (x, y) input fields */
  175. #bm-contain-coords input[type="number"] {
  176.   appearance: auto;
  177.   -moz-appearance: textfield;
  178.   width: 5.5ch;
  179.   margin-left: 1ch;
  180.   background-color: rgba(0, 0, 0, 0.2);
  181.   padding: 0 0.5ch;
  182.   font-size: small;
  183. }
  184.  
  185. /* Removes scroll bar on tile & pixel input fields */
  186. #bm-contain-coords input[type="number"]::-webkit-outer-spin-button,
  187. #bm-contain-coords input[type="number"]::-webkit-inner-spin-button {
  188.   -webkit-appearance: none;
  189.   margin: 0;
  190. }
  191.  
  192. /* Automation button container */
  193. #bm-contain-buttons-template {
  194.   display: flex;
  195.   flex-direction: row;
  196.   flex-wrap: wrap;
  197.   align-content: center;
  198.   justify-content: center;
  199.   align-items: center;
  200.   gap: 1ch;
  201. }
  202.  
  203. /* The template file upload button */
  204. div:has(> #bm-input-file-template) > button {
  205.   width: 100%;
  206.   white-space: nowrap;
  207.   overflow: hidden;
  208.   text-overflow: ellipsis;
  209. }
  210.  
  211. /* Force complete invisibility of file input to prevent native browser text */
  212. #bm-input-file-template,
  213. input[type="file"][id*="template"] {
  214.   display: none !important;
  215.   visibility: hidden !important;
  216.   position: absolute !important;
  217.   left: -9999px !important;
  218.   top: -9999px !important;
  219.   width: 0 !important;
  220.   height: 0 !important;
  221.   opacity: 0 !important;
  222.   z-index: -9999 !important;
  223.   pointer-events: none !important;
  224. }
  225.  
  226. /* Output status area */
  227. #bm-output-status {
  228.   font-size: small;
  229.   background-color: rgba(0, 0, 0, 0.2);
  230.   padding: 0 0.5ch;
  231.   height: 3.75em;
  232.   width: 100%;
  233. }
  234.  
  235. /* The action buttons below the status textarea */
  236. #bm-contain-buttons-action {
  237.   display: flex;
  238.   justify-content: space-between;
  239. }
  240.  
  241. /* All small elements */
  242. #bm-overlay small {
  243.   font-size: x-small;
  244.   color: lightgray;
  245. }
  246.  
  247. /* The elements that need spacing from each-other */
  248. #bm-contain-userinfo,
  249. #bm-contain-automation,
  250. #bm-contain-coords,
  251. #bm-contain-buttons-template,
  252. div:has(> #bm-input-file-template),
  253. #bm-output-status {
  254.   margin-top: 0.5em;
  255. }
  256.  
  257. /* All overlay buttons */
  258. #bm-overlay button, #bm-overlay-telemetry button {
  259.   background-color: #144eb9;
  260.   border-radius: 1em;
  261.   padding: 0 0.75ch;
  262. }
  263.  
  264. /* All overlay buttons when hovered/focused */
  265. #bm-overlay button:hover, #bm-overlay button:focus-visible, #bm-overlay-telemetry button:hover, #bm-overlay-telemetry button:focus-visible {
  266.   background-color: #1061e5;
  267. }
  268.  
  269. /* All overlay buttons when pressed (plus disabled color) */
  270. #bm-overlay button:active, #bm-overlay-telemetry button:active
  271. #bm-overlay button:disabled, #bm-overlay-telemetry button:disabled {
  272.   background-color: #2e97ff;
  273. }
  274.  
  275. /* All overlay buttons when disabled */
  276. #bm-overlay button:disabled, #bm-overlay-telemetry button:disabled {
  277.   text-decoration: line-through;
  278. }
Advertisement
Add Comment
Please, Sign In to add comment