mobile-config-firefox/chrome/classic_grid_main_menu_popup.css
MrOtherGuy 0ff12e01fe Add support for modern flexbox layout
Flexbox model will replace old xul box as the default display model so
this patch adds support for that in a whole bunch of styles.

A lot of style rules are marked as "Fx < 112 compatibility" rules and
those can be removed when 112 hits release.
2023-03-11 12:26:07 +02:00

233 lines
No EOL
7.8 KiB
CSS

/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/classic_grid_main_menu_popup.css made available under Mozilla Public License v. 2.0
See the above repository for updates as well as full license text. */
/* Makes the main menu popup apper in grid-like format that somewhat resembles the menu from Australis styling */
/* Basic styling */
#appMenu-protonMainView{ max-width: initial !important; }
#appMenu-protonMainView > .panel-subview-body{
display: flex;
flex-direction: row;
max-width: 290px;
height: 466px !important;
/* Raise this if you see scrollbar in the popup. Popup height depends on font-size */
max-height: none !important;
flex-wrap: wrap;
padding-bottom: 0px !important;
align-content: end;
}
#appMenu-protonMainView > .panel-subview-body > toolbarseparator{
min-width: 250px;
flex-grow:1;
margin-inline: 0 !important;
}
#appMenu-protonMainView > .panel-subview-body > toolbaritem{ flex-grow: 1 }
:where(#appMenu-protonMainView) > .panel-subview-body > toolbarbutton{
width: 70px;
height: 76px;
flex-grow:1;
}
#appMenu-protonMainView > .panel-subview-body > toolbarbutton > .toolbarbutton-icon{
-moz-box-flex: 1;
}
#appMenu-protonMainView > .panel-subview-body > toolbarbutton{
flex-direction: column;
-moz-box-orient: vertical; /* Fx <112 compatibility */
}
:where(#appMenu-protonMainView) > .panel-subview-body > toolbarbutton.subviewbutton{
padding-inline: 4px !important;
margin-inline: 8px !important;
fill: currentColor;
}
#appMenu-protonMainView > .panel-subview-body > .subviewbutton > .toolbarbutton-text{
overflow: hidden !important;
text-overflow: ellipsis !important;
max-width: 70px;
}
/* Unique styling for Edit and Zoom controls */
#appMenu-zoom-controls,
#appMenu-zoom-controls + toolbarseparator{
order: -1;
height: initial !important;
margin: initial !important;
flex-grow: 1;
}
#appMenu-zoom-controls + toolbarseparator{ margin-block: 0 4px !important; }
#appMenu-zoom-controls{ padding-block: 2px !important; }
#appMenu-zoom-controls > :not(:last-child){
-moz-box-flex: 1 !important; /* Fx <112 compatibility */
-moz-box-pack: center !important; /* Fx <112 compatibility */
flex-grow: 1 !important;
justify-content: center !important;
border-radius: 0 !important;
}
#appMenu-zoomReset-button2{
border-inline: 1px solid var(--panel-separator-color) !important;
}
/* Reorder separators & "special" items */
#appMenu-fxa-separator{
margin-block: 0 -1px !important;
}
#appMenu-proton-addon-banners,
#appMenu-fxa-separator,
#appMenu-fxa-status2{ order: 2; }
#appMenu-extensions-themes-button + toolbarseparator{
order: 3;
margin-block: 0 -1px !important;
}
/* Set minimum width for "full-row" items */
#appMenu-fxa-status2,
#appMenu-fxa-separator{
min-width: 280px;
}
/* Full-row items should have contents laid out horizontally */
#appMenu-proton-update-banner,
#appMenu-fxa-status2,
#appMenu-fxa-label2{ -moz-box-orient: horizontal !important; }
#appMenu-proton-addon-banners > .addon-banner-item{
margin: 0px !important;
}
/* "Main" items styling */
#appMenu-proton-update-banner,
#appMenu-fxa-status2,
#appMenu-more-button2.subviewbutton,
#appMenu-quit-button2.subviewbutton,
#appMenu-help-button2.subviewbutton{
order: 3;
margin: initial !important;
height: unset !important;
padding-inline: 0 !important;
width: initial;
}
#appMenu-proton-update-banner,
#appMenu-quit-button2.subviewbutton{ order: 4 }
#appMenu-more-button2 > .toolbarbutton-icon{
-moz-box-flex: 0 !important;
}
/* Color styling for items */
#appMenu-protonMainView > .panel-subview-body toolbarbutton:not([disabled]):hover{
box-shadow: inset 0 0 3px 0px var(--button-bgcolor);
}
#appMenu-proton-update-banner{ border-inline-end: 1px solid var(--panel-separator-color) !important; }
#appMenu-help-button2{ border-inline: 1px solid var(--panel-separator-color) }
/* Hide some additional items */
#appMenu-fxa-text,
#appMenu-help-button2 + toolbarseparator,
#appMenu-new-private-window-button2 + toolbarseparator,
#appMenu-zoom-controls > #appMenu-fullscreen-button > label,
#appMenu-zoom-controls > label,
#appMenu-zoom-controls > spacer,
#appMenu-edit-controls2 > label,
#appMenu-edit-controls2 > spacer,
#appMenu-protonMainView > .panel-subview-body > toolbarbutton::after{ display: none !important; }
/* Sync styling */
#appMenu-fxa-label2{
margin: 0 !important;
padding: 0 !important;
font-size: 1em !important;
}
#appMenu-fxa-status2{
display: grid !important;
padding-block: 0 !important;
justify-content: stretch !important;
}
#appMenu-fxa-status2 > *{ grid-area: 1/1 }
#appMenu-fxa-status2 > toolbarbutton::before,
#appMenu-protonMainView > .panel-subview-body > toolbarbutton > image{
fill: currentColor;
-moz-context-properties: fill;
}
#appMenu-fxa-status2 > toolbarbutton::before{
display: flex;
content: "";
width: 16px;
height: 16px;
margin-inline: 8px;
background-image: var(--avatar-image-url)
}
#appMenu-more-button2 > .toolbarbutton-icon{ margin-inline: 8px !important; }
#appMenu-proton-update-banner > .toolbarbutton-text,
#appMenu-help-button2 > .toolbarbutton-text,
#appMenu-quit-button2 > .toolbarbutton-text{
display: none !important;
}
#appMenu-proton-update-banner,
#appMenu-fxa-label2,
#appMenu-more-button2,
#appMenu-help-button2,
#appMenu-quit-button2{
background-color: var(--button-bgcolor) !important;
border-radius: 0 !important;
-moz-box-orient: horizontal !important; /* Fx <112 compatibility */
-moz-box-pack: center !important; /* Fx <112 compatibility */
flex-direction: row !important;
justify-content: center !important;
padding-block: 12px !important;
opacity: 0.8;
}
#appMenu-more-button2{
min-width: 170px;
justify-content: start !important;
}
#appMenu-proton-update-banner:hover,
#appMenu-fxa-label2:hover,
#appMenu-more-button2:hover,
#appMenu-help-button2:hover{
opacity: 1;
}
#appMenu-proton-update-banner{ background-color: rgb(120,180,120) !important; }
#appMenu-quit-button2:hover{ background-color: rgb(220,100,100) !important; }
/* Reserve fixed space for addon banners */
#appMenu-proton-addon-banners{
min-width: 200px;
height: 36px !important;
overflow: auto;
}
#appMenu-proton-addon-banners > .addon-banner-item{
padding-block: 2px !important;
border-radius: 0 !important;
}
#appMenu-proton-addon-banners > .addon-banner-item::after{
margin-top: 6px !important;
}
/* Missing icons */
#appMenu-proton-update-banner{ list-style-image: url("chrome://global/skin/icons/reload.svg"); }
#appMenu-new-tab-button2{ list-style-image: url("chrome://browser/skin/new-tab.svg") }
#appMenu-new-window-button2{ list-style-image: url("chrome://browser/skin/window.svg") }
#appMenu-new-private-window-button2{ list-style-image: url("chrome://browser/skin/privateBrowsing.svg") }
#appMenu-bookmarks-button{ list-style-image: url("chrome://browser/skin/bookmark-star-on-tray.svg") }
#appMenu-history-button{ list-style-image: url("chrome://browser/skin/history.svg") }
#appMenu-downloads-button{ list-style-image: url("chrome://browser/skin/downloads/downloads.svg") }
#appMenu-passwords-button{ list-style-image: url("chrome://browser/skin/login.svg") }
#appMenu-extensions-themes-button{ list-style-image: url("chrome://mozapps/skin/extensions/extension.svg") }
#appMenu-print-button2{ list-style-image: url("chrome://global/skin/icons/print.svg") }
#appMenu-save-file-button2{ list-style-image: url("chrome://browser/skin/save.svg") }
#appMenu-find-button2{ list-style-image: url("chrome://global/skin/icons/search-glass.svg") }
#appMenu-settings-button{ list-style-image: url("chrome://global/skin/icons/settings.svg") }
#appMenu-more-button2{ list-style-image: url("chrome://global/skin/icons/developer.svg") }
#appMenu-help-button2{ list-style-image: url("chrome://global/skin/icons/info.svg") }
#appMenu-quit-button2{ list-style-image: url("chrome://devtools/skin/images/search-clear.svg") }