mirror of
https://codeberg.org/claui/mobile-config-firefox.git
synced 2024-11-14 05:10:16 +00:00
93 lines
4 KiB
CSS
93 lines
4 KiB
CSS
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/status_inside_urlbar.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 */
|
|
|
|
/**************
|
|
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-input-box{
|
|
display: grid;
|
|
position: relative;
|
|
}
|
|
|
|
.urlbar-input-box > *{
|
|
grid-area: 1 / 1;
|
|
z-index: 0;
|
|
}
|
|
|
|
.urlbar-input-box::after{
|
|
z-index: 2;
|
|
content: "";
|
|
display: -moz-box;
|
|
width: 100%;
|
|
height: 100%;
|
|
pointer-events:none;
|
|
background-position: left 3px;
|
|
background-repeat: no-repeat;
|
|
background-image: -moz-element(#statuspanel);
|
|
grid-area: 1 / 1;
|
|
}
|
|
|
|
/* So here's the thing. This essentially disables the right click context-menu on urlbar textbox in Firefox 72. This is unfortunate but necessary due to grid layout - try disabling the rule and see what happens */
|
|
.urlbar-input-box > menupopup{ display: none !important }
|
|
|
|
/* 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 .urlbar-input-box::after,
|
|
#urlbar[focused] .urlbar-input-box::after{
|
|
visibility: hidden;
|
|
/* Remove the image to get rid of -moz-element() related problems */
|
|
background-image: none !important
|
|
}
|
|
|
|
:root[uidensity="compact"] #urlbar .urlbar-input-box::after{ background-position-y: 1px }
|
|
:root[uidensity="touch"] #urlbar .urlbar-input-box::after{ background-position-y: 4px }
|
|
|
|
#statuspanel-inner > #statuspanel-label{
|
|
height:3em;
|
|
min-width: 1000px;
|
|
background-color: var(--lwt-toolbar-field-background-color, hsla(0,0%,100%,.8)) !important;
|
|
border: none !important;
|
|
font-size: inherit;
|
|
color: inherit !important;
|
|
margin-right: 0px !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-inner{ background-color: var(--toolbar-bgcolor,--toolbar-non-lwt-bgcolor) }
|
|
|
|
#statuspanel{ color: var(--lwt-toolbar-field-color, black) ; z-index: -1; max-width: 100% !important; }
|
|
#statuspanel[type="status"] { color: Highlight }
|
|
|
|
/* You will need to adjust these probably as they depend on OS, text size etc. */
|
|
#statuspanel-inner{ margin-left: -1px; }
|
|
#statuspanel-inner > #statuspanel-label{ margin-left: -2px !important; margin-top: 0px !important; }
|
|
|
|
|
|
/* OPTIONAL FEATURES */
|
|
/* Uncomment to enable */
|
|
|
|
|
|
/*
|
|
Don't show common values to save space (useful for oneliner)
|
|
If you change the font size of the label then you'll have to modify these too
|
|
non-https links get a slight red hue
|
|
/*
|
|
#statuspanel-inner > #statuspanel-label[value^="http:"]{ margin-left: -3.7ch !important; color: tomato }
|
|
#statuspanel-inner > #statuspanel-label[value^="https:"]{ margin-left: -6.1ch !important; }
|
|
#statuspanel-inner > #statuspanel-label[value^="www"]{ margin-left: -4.5ch !important; }
|
|
#statuspanel-inner > #statuspanel-label[value^="http://www"]{ margin-left: -9.7ch !important; }
|
|
#statuspanel-inner > #statuspanel-label[value^="https://www"]{ margin-left: -10.1ch !important; }
|
|
*/
|
|
|
|
/* Center the statuspanel text. This might be useful with centered urlbar text */
|
|
/*
|
|
#statuspanel-inner > #statuspanel-label{ text-align: center }
|
|
.urlbar-input-box::after{ background-position-x: center !important; }
|
|
*/
|