Guest User

mcos

a guest
Oct 3rd, 2026
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.43 KB | None | 0 0
  1. /* ============================================================
  2. macOS Traffic-Light Controls (Corner-Edge Close Hitbox)
  3. ============================================================ */
  4.  
  5. :root {
  6. --spring-fast: cubic-bezier(0.16, 1, 0.3, 1);
  7. --spring-gentle: cubic-bezier(0.34, 1.2, 0.55, 1);
  8. --spring-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  9. --spring-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
  10. }
  11.  
  12. /* 1. Duplicate nav-bar controls hide */
  13. #nav-bar .titlebar-buttonbox-container,
  14. #nav-bar .titlebar-buttonbox,
  15. #nav-bar > .titlebar-button {
  16. display: none !important;
  17. visibility: hidden !important;
  18. width: 0 !important;
  19. height: 0 !important;
  20. }
  21.  
  22. /* 2. Controls container - zero right margin/padding so it touches the corner */
  23. #TabsToolbar .titlebar-buttonbox-container {
  24. display: flex !important;
  25. align-items: stretch !important;
  26. justify-content: flex-end !important;
  27. height: 100% !important;
  28. margin: 0 !important;
  29. padding: 0 !important;
  30. }
  31.  
  32. #TabsToolbar .titlebar-buttonbox {
  33. display: flex !important;
  34. align-items: stretch !important;
  35. justify-content: flex-end !important;
  36. height: 100% !important;
  37. margin: 0 !important;
  38. padding: 0 !important;
  39. gap: 0 !important;
  40. }
  41.  
  42. /* 3. Button order: Minimize -> Maximize -> Close */
  43. #TabsToolbar .titlebar-min {
  44. order: 1 !important;
  45. }
  46. #TabsToolbar .titlebar-max,
  47. #TabsToolbar .titlebar-restore {
  48. order: 2 !important;
  49. }
  50. #TabsToolbar .titlebar-close {
  51. order: 3 !important;
  52. }
  53.  
  54. /* 4. Native Windows icons hide */
  55. .titlebar-button *,
  56. .titlebar-button > .toolbarbutton-icon,
  57. .titlebar-button-icon {
  58. display: none !important;
  59. opacity: 0 !important;
  60. visibility: hidden !important;
  61. }
  62.  
  63. /* Maximize vs Restore toggle */
  64. #main-window[sizemode="maximized"] .titlebar-max,
  65. :root[sizemode="maximized"] .titlebar-max {
  66. display: none !important;
  67. }
  68. #main-window:not([sizemode="maximized"]) .titlebar-restore,
  69. :root:not([sizemode="maximized"]) .titlebar-restore {
  70. display: none !important;
  71. }
  72.  
  73. /* 5. Base Buttons Hitbox */
  74. #TabsToolbar .titlebar-button {
  75. appearance: none !important;
  76. -moz-appearance: none !important;
  77. display: flex !important;
  78. align-items: center !important;
  79. justify-content: center !important;
  80. width: 44px !important;
  81. min-width: 44px !important;
  82. max-width: 44px !important;
  83. height: 100% !important;
  84. padding: 0 !important;
  85. margin: 0 !important;
  86. border: none !important;
  87. background: transparent !important;
  88. cursor: default !important;
  89. }
  90.  
  91. /* CLOSE BUTTON - Screen ke extreme right corner tak flush */
  92. #TabsToolbar .titlebar-close {
  93. width: 46px !important;
  94. min-width: 46px !important;
  95. max-width: 46px !important;
  96. margin-right: 0 !important;
  97. padding-right: 2px !important;
  98. }
  99.  
  100. /* 6. Centered macOS Dots */
  101. #TabsToolbar .titlebar-button::before {
  102. content: "" !important;
  103. display: block !important;
  104. width: 13px !important;
  105. height: 13px !important;
  106. min-height: 13px !important;
  107. border-radius: 999px !important;
  108. box-shadow:
  109. 0 1px 0 rgba(255, 255, 255, 0.08),
  110. 0 1px 4px rgba(0, 0, 0, 0.35) !important;
  111. transition:
  112. height 400ms var(--spring-elastic),
  113. min-height 400ms var(--spring-elastic),
  114. background-color 300ms var(--spring-smooth),
  115. box-shadow 350ms var(--spring-smooth),
  116. transform 220ms var(--spring-gentle) !important;
  117. }
  118.  
  119. /* Colors */
  120. #TabsToolbar .titlebar-close::before {
  121. background-color: #ff5f56 !important;
  122. }
  123. #TabsToolbar .titlebar-min::before {
  124. background-color: #ffbd2e !important;
  125. }
  126. #TabsToolbar .titlebar-max::before,
  127. #TabsToolbar .titlebar-restore::before {
  128. background-color: #27c93f !important;
  129. }
  130.  
  131. /* 7. Hover Effects */
  132. #TabsToolbar .titlebar-button:hover::before {
  133. height: 24px !important;
  134. min-height: 24px !important;
  135. transform: scale(1.1) !important;
  136. }
  137.  
  138. #TabsToolbar .titlebar-close:hover::before {
  139. background-color: #ff3b30 !important;
  140. box-shadow: 0 0 10px rgba(255, 59, 48, 0.65) !important;
  141. }
  142. #TabsToolbar .titlebar-min:hover::before {
  143. background-color: #ff9500 !important;
  144. box-shadow: 0 0 10px rgba(255, 149, 0, 0.65) !important;
  145. }
  146. #TabsToolbar .titlebar-max:hover::before,
  147. #TabsToolbar .titlebar-restore:hover::before {
  148. background-color: #28cd41 !important;
  149. box-shadow: 0 0 10px rgba(40, 205, 65, 0.65) !important;
  150. }
  151.  
  152. /* Click feedback */
  153. #TabsToolbar .titlebar-button:active::before {
  154. transform: scale(0.85) !important;
  155. transition-duration: 80ms !important;
  156. }
  157.  
Advertisement
Add Comment
Please, Sign In to add comment