fenix-fox/chrome/status_inside_urlbar_v2.css

80 lines
3 KiB
CSS
Raw Normal View History

2020-08-09 10:52:29 +00:00
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/status_inside_urlbar_v2.css made available under Mozilla Public License v. 2.0
See the above repository for updates as well as full license text. */
/* STATUSPANEL INSIDE URLBAR */
/* This _v2 variant "replaces" the whole contents of the urlbar, including all icons,
with statuspanel text when needed. The "normal" variant replaces only the url part. */
2020-08-09 10:52:29 +00:00
/**************
IMPORTANT WARNING
Using this style can lead to long tab switch times (and probably other problems). Everything may be fine when Firefox starts but situation gets gradually worse, although pretty slowly.
Relevant information: https://bugzilla.mozilla.org/show_bug.cgi?id=1496065
As a workaround, the -moz-element background image is removed somewhat often which seems work at first glance. But there might still be some related issues on really long sessions. Just be aware.
**************/
#urlbar::before{
z-index: 2;
content: "";
display: block;
position: absolute;
pointer-events:none;
background-repeat: no-repeat;
background-image: -moz-element(#statuspanel);
background-position: left 3px;
2020-08-09 10:52:29 +00:00
inset: 1px;
}
/* Using -moz-element() causes some problems after Firefox has been running several hours such as long tab switch times. For this reason the background image is removed on hover and focused states which appears to clear the state. */
/* Hide the status ovelay when urlbar is hovered */
#urlbar:hover::before,
#urlbar[focused]::before{
visibility: hidden;
/* Remove the image to get rid of -moz-element() related problems */
background-image: none !important;
}
:root[uidensity="compact"] #urlbar::before{ background-position-y: 0px }
:root[uidensity="touch"] #urlbar::before{ background-position-y: 3px }
#statuspanel-label{
2020-08-09 10:52:29 +00:00
height:3em;
min-width: 1000px;
background-color: var(--toolbar-field-background-color) !important;
2020-08-09 10:52:29 +00:00
border: none !important;
font-size: 1.15em;
color: inherit !important;
margin-inline: 0px !important;
padding-top: 3px !important;
}
/* If you use a theme where urlbar is partially transparent you should edit this color to something that closely matches the perceived color of urlbar. Or perhaps use background-image - linear-gradient() can work well here. But keep the color or image opaque or otherwise you'll face an issue where urlbar text bleeds through */
#statuspanel{ background-color: var(--toolbar-bgcolor) }
2020-08-09 10:52:29 +00:00
#statuspanel{
color: var(--toolbar-field-color, black);
z-index: -1;
max-width: 100% !important;
padding-top: 0 !important;
}
2020-08-09 10:52:29 +00:00
#statuspanel[type="status"] { color: Highlight }
/* This creates opaque layer to be shown in front of "hidden" real statuspanel */
.browserStack{
background-color: var(--tabpanel-background-color);
}
2020-08-09 10:52:29 +00:00
/* OPTIONAL FEATURES */
/* Uncomment to enable */
/* Center the statuspanel text. This might be useful with centered urlbar text */
/*
#statuspanel-label{
text-align: center;
-moz-box-pack: center;
justify-content: center;
}
.urlbar-input-box::after{ background-position-x: center !important; }
*/