73xt0vitb

Rustrician.io Stylesheet

Jan 8th, 2021 (edited)
1,123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 5.02 KB | None | 0 0
  1. #user-area div.dropdown > a:nth-child(1), /* Profile pic */
  2. #user-area > a:nth-child(1), /* Login text */
  3. #donate,
  4. #creator-info,
  5. #banner,
  6. #logo {
  7.     display: none;
  8. }
  9.  
  10. #user-area,
  11. #topbarContainer {
  12.     padding: 0;
  13.     background-color: transparent;
  14. }
  15.  
  16. /*
  17. Move the top bar to the bottom right corner (right end of footer).
  18. This causes the user area to move to the same position since it's a child.
  19. The footer's static height is easier to work with. Conversely, the toolbar
  20. dynamically resizes and therefore has greater risk of element overlapping.
  21. */
  22. #topbarContainer {
  23.     position: absolute;
  24.  
  25.     /* Force it to the bottom */
  26.     top: unset;
  27.     bottom: 0;
  28.  
  29.     /* Be as narrow as possible to avoid blocking hover of other buttons */
  30.     left: unset;
  31.    
  32.     right: 0; /* Align it to the right end */
  33.     padding: 10px; /* Same as the margins of the Steam login image */
  34.  
  35.     /* Same height as the footer, but account for the different padding */
  36.     max-height: calc((38px + 4px * 2) - (10px * 2));
  37.     height: calc((38px + 4px * 2) - (10px * 2));
  38. }
  39.  
  40. #user-area {
  41.     position: static; /* Unnecessary but feels safer than absolute */
  42.     visibility: hidden; /* Hide all the login text */
  43.     float: right; /* Move the username to the right */
  44.     height: 100%; /* Important for centring the username later */
  45. }
  46.  
  47. /* Cancel out the hidden visibility only for the children */
  48. #user-area > * {
  49.     visibility: visible;
  50. }
  51.  
  52. /*
  53. This is the container for the Steam login image.
  54. Move it to the same position as the footer and
  55. Set its dimensions to be the same as the footer.
  56. */
  57. #login-link {
  58.     /*
  59.     Absolute has to be used because its normally positioned too
  60.     far down due to the hidden text above displacing the image.
  61.     */
  62.     position: absolute;
  63.     top: 0;
  64.     right: 0;
  65.     left: 0;
  66.     bottom: 0;
  67.  
  68.     height: 100%;
  69.     width: 100%;
  70. }
  71.  
  72. /* Move the Steam login image to the right end of the footer */
  73. #login-link > img:nth-child(1) {
  74.     /* Already has a top margin of 10px; copy that for the other sides */
  75.     margin-right: 10px;
  76.     margin-bottom: 10px;
  77.  
  78.     height: calc(100% - 10px * 2); /* Subtract the top and bottom margins */
  79.     float: right;
  80. }
  81.  
  82. /* Vertically centre the username */
  83. #user-area .dropdown {
  84.     height: 100%;
  85.     display: flex;
  86.     align-items: center;
  87. }
  88.  
  89. /* Copy the btn-clear style for the username */
  90. #user-name {
  91.     background: transparent;
  92.     border: none;
  93.     border-radius: 4px;
  94.     color: #cfcfcf;
  95.     padding: 0px 4px; /* Remove vertical padding; it makes it too tall */
  96.     text-align: center;
  97.     text-decoration: none;
  98.     display: inline-block;
  99.     font-size: 14px;
  100.     /* margin: 1px 3px; */
  101.     -webkit-transition-duration: 0.1s;
  102.     transition-duration: 0.1s;
  103.     cursor: pointer;
  104.     white-space: nowrap;
  105. }
  106.  
  107. /* Copy the btn-clear style for the username */
  108. #user-name:hover {
  109.     background-color: #a7a7a7;
  110.     color: white;
  111. }
  112.  
  113. /*
  114. Increase the space between the username and the Steam logo.
  115. Looks weird with the default margin of 2px despite other buttons using that.
  116. Maybe it's cause the image is on the right in this case.
  117. */
  118. #user-name > img {
  119.     margin-left: 6px !important;
  120. }
  121.  
  122. /*
  123. Align the dropdown popup to the bottom right corner,
  124. with the bottom edge touching the top of the footer
  125. */
  126. #user-area .dropdown-content {
  127.     position: fixed;
  128.     bottom: calc(38px + 4px * 2);
  129.     /* Add padding of footer */
  130.     right: 0;
  131. }
  132.  
  133. /* Make the app take up the full height of the viewport */
  134. #appContainer {
  135.     position: static;
  136.     height: calc(100vh - 38px - 4px * 2); /* Subtract height of footer */
  137. }
  138.  
  139. /* Make the loading overlay take up the full height of the viewport */
  140. #loading {
  141.     position: fixed;
  142.     top: unset;
  143.     bottom: unset;
  144.     height: calc(100vh - 38px - 4px * 2); /* Subtract height of footer */
  145. }
  146.  
  147. /*
  148. When panning starts, #outlineContainer becomes a child of this element.
  149. This element is the first child, just like #outlineContainer normally is.
  150. This means the style applies to both the wrapper div and #outlineContainer.
  151. */
  152. #graphContainer > div:first-child {
  153.     left: unset !important;
  154.     top: 10px !important;
  155.     right: 10px !important;
  156.     bottom: unset !important;
  157.     position: absolute !important;
  158. }
  159.  
  160. #outlineContainer {
  161.     position: static !important;  /* This only applies when panning */
  162.     background-color: rgba(255, 255, 255, 0.85);
  163. }
  164.  
  165. /* Remove size restrictions to prevent scrollbars in small viewports */
  166. #toolbarContainer,
  167. #graphContainer {
  168.     min-width: unset;
  169.     max-height: unset;
  170. }
  171.  
  172. /*
  173. Reset the tooltip position when its hidden.
  174. When the tooltip is hidden, it remains in its last visible position.
  175. When resizing the viewport, the tooltip will remain at its old position,
  176. causing a scroll bar to appear.
  177. */
  178. .mxTooltip[style*="visibility: hidden"] {
  179.     left: unset !important;
  180.     top: unset !important;
  181. }
  182.  
  183. /* Prevent the user area from overlapping the logo */
  184. @media screen and (max-width: 540px) {
  185.     #footer-logo {
  186.         display: none;
  187.     }
  188. }
Advertisement
Add Comment
Please, Sign In to add comment