Advertisement
Guest User

Temporary solution for titlebar buttons when using Mica

a guest
Oct 30th, 2024
1,746
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 1.51 KB | Source Code | 0 0
  1. /* show titlebar buttonbox when mica is activated */
  2. :root[tabsintitlebar] {
  3.   @media (-moz-windows-mica) {
  4.     &:not([lwtheme]) {
  5.       @media not (-moz-windows-accent-color-in-titlebar) {
  6.         & .titlebar-buttonbox {
  7.           opacity: 1 !important;
  8.         }
  9.       }
  10.     }
  11.   }
  12. }
  13.  
  14. /* set height to the buttonbox container */
  15. .titlebar-buttonbox-container {
  16.   height: 29px !important;
  17. }
  18.  
  19. /* showing and hiding icons, not for private browsing mode */
  20. #main-window:not([privatebrowsingmode="temporary"]) {
  21.   .titlebar-close:not(:hover) > .toolbarbutton-icon {
  22.     opacity: 0 !important;
  23.   }
  24.  
  25.   .titlebar-max > .toolbarbutton-icon,
  26.   .titlebar-min > .toolbarbutton-icon,
  27.   .titlebar-restore > .toolbarbutton-icon {
  28.     opacity: 0 !important;
  29.   }
  30. }
  31.  
  32. /* all padding and width fixes for 100% display scale */
  33. :root[sizemode="normal"] .titlebar-close {
  34.   padding: 7px 18px 9px 16px !important;
  35.   width: 45px;
  36. }
  37.  
  38. :root[sizemode="normal"] .titlebar-max {
  39.   padding: 7px 18px 9px 16px !important;
  40. }
  41.  
  42. :root[sizemode="maximized"] .titlebar-close {
  43.   border-right: 2px solid transparent !important;
  44.   background-clip: padding-box;
  45. }
  46.  
  47. :root[sizemode="maximized"] .titlebar-close {
  48.   padding: 7px 17px 9px !important;
  49. }
  50.  
  51. :root[sizemode="maximized"] .titlebar-min {
  52.   padding: 8px 17px 8px !important;
  53. }
  54.  
  55. .titlebar-restore {
  56.   padding: 7px 17px 9px !important;
  57. }
  58.  
  59. /* optional: classic windows colors */
  60. .titlebar-close:hover {
  61.   background-color: #c42b1c !important;
  62.   stroke: white !important;
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement