Make compatible with Firefox 72 and megabar

This commit is contained in:
MrOtherGuy 2020-01-18 10:30:26 +02:00
parent 9de7fe144f
commit 68a14dc4cd

View file

@ -4,16 +4,18 @@
/* Focused urlbar popup radius, can be edited freely */
#urlbar-container{ border-radius: 8px }
#urlbar > .urlbarView:not(.megabar),
#urlbar.megabar[focused] > #urlbar-background{ border-radius: 8px !important; }
/* Layout containing block hackery, don't touch pls */
#urlbar-container{ transform: translateY(0); position: relative; z-index: 10 }
#nav-bar-customization-target{ overflow: visible !important }
#urlbar-container:not(.megabar){ transform: translateY(0); position: relative; z-index: 10 }
/* constrain popup to urlbar width */
#urlbar-results{
.urlbarView:not(.megabar){
max-width: 100% !important;
top: 0 !important;
top: calc(2px + var(--toolbarbutton-outer-padding)) !important;
border-width: 0 !important;
background-color: transparent !important;
pointer-events: none;
@ -21,25 +23,25 @@
}
/* Apply popup background color to the urlbar background when focused */
#urlbar-container:focus-within{ background-color: var(--autocomplete-popup-background) }
#urlbar:not(.megabar):focus-within{ background-color: var(--autocomplete-popup-background) }
/* Spacer to offset actual results. This is placed over urlbar text */
#urlbar-results::before{
.urlbarView:not(.megabar)::before{
content: "";
display: -moz-box;
height: calc(1.15em + var(--toolbarbutton-outer-padding))
height: calc(0.8em + var(--toolbarbutton-outer-padding))
}
/* Add popup background color to sub-elements, since it was removed from the popup itself */
#urlbar-results > .search-one-offs,
#urlbar-results > .urlbarView-body-outer{
.urlbarView:not(.megabar) > .search-one-offs,
.urlbarView:not(.megabar) > .urlbarView-body-outer{
background-color: var(--autocomplete-popup-background); /* Set background-color here */
color: var(--autocomplete-popup-color); /* Set text color here */
pointer-events: auto
}
/* Add separator line under urlbar text field */
#urlbarView-results::before{
.urlbarView:not(.megabar) > .urlbarView-body-outer::before{
content:"";
display: block;
height: 1px;
@ -47,19 +49,19 @@
background-image: linear-gradient(to right,transparent,grey 35%, grey 65%, transparent)
}
/* Remove normal urlbar border */
#urlbar[focused]{ border-color: transparent !important; }
/* Propagate border-radii to sub-elements */
#urlbar-results > .search-one-offs,
#urlbar[focused]:not([usertyping]) + #urlbar-results > .urlbarView-body-outer{
border-bottom-left-radius: inherit;
border-bottom-right-radius: inherit
/* Remove normal urlbar border and background */
#urlbar:not(.megabar)[focused]{
border-color: transparent !important;
background-color: var(--autocomplete-popup-background) !important;
}
/* Add shadow to focused popup + urlbar */
#urlbar-results,
#urlbar-container:focus-within { box-shadow: 0 0 5px 3px var(--autocomplete-popup-highlight-background) }
#urlbar:not(.megabar)[focused]:not([open]),
#urlbar.megabar[focused] > #urlbar-background,
#urlbar[open] > .urlbarView:not(.megabar) { box-shadow: 0 0 5px 3px var(--autocomplete-popup-highlight-background) !important; }
#urlbar.megabar[focused] > #urlbar-background{ border-width: 0px !important;; }
/* Remove horizontal paddings from texts */
.urlbarView-row{ padding: 6px 0px; }
.urlbarView-row{ padding: 6px 0px !important; }