diff --git a/chrome/global/browser.css b/chrome/global/browser.css index 67411ae..26c62f4 100644 --- a/chrome/global/browser.css +++ b/chrome/global/browser.css @@ -1,4 +1,5 @@ -/* Edge-Frfox - browser.css */ +/* Edge-Frfox - browser.css + * https://github.com/bmFtZQ/edge-frfox */ /* Windows has 1px missing space on top of window. */ @media (-moz-platform: windows) { @@ -75,7 +76,7 @@ } /* Apply rounded corners to the browser container. */ - #appcontent .browserContainer { + #appcontent .browserStack { margin-inline: var(--uc-tweak-rounded-corners-padding) !important; margin-block-end: var(--uc-tweak-rounded-corners-padding) !important; border-radius: var(--uc-tweak-rounded-corners-radius) !important; diff --git a/chrome/toolbar/findbar.css b/chrome/toolbar/findbar.css index eef6c6f..74d7de9 100644 --- a/chrome/toolbar/findbar.css +++ b/chrome/toolbar/findbar.css @@ -1,42 +1,67 @@ -/* Edge-Frfox - findbar.css */ - -.findbar-find-previous, -.findbar-find-next, -findbar .close-icon { - border-radius: var(--toolbarbutton-border-radius) !important; -} +/* Edge-Frfox - findbar.css + * https://github.com/bmFtZQ/edge-frfox */ +/* Findbar text input box. */ .findbar-textbox { border: 0 !important; - border-radius: calc(var(--toolbarbutton-border-radius) + 2px) !important; -} - -.findbar-textbox:-moz-lwtheme { + border-radius: var(--toolbarbutton-border-radius) !important; background-color: var(--toolbar-field-background-color) !important; -} -.findbar-textbox:focus { - outline: 2px solid var(--focus-outline-color, -moz-accent-color) !important; - outline-offset: -1px !important; -} + /* Add shadow when in light mode with no theme applied, like the URL bar. */ + &:not(:-moz-lwtheme) { + box-shadow: 0 0 4px light-dark(rgb(0 0 0 / .1), transparent) !important; + } + + &:focus { + outline-width: 2px !important; + outline-offset: -1px !important; + } -.findbar-textbox[status="notfound"] { - outline: 2px solid var(--input-error-border-color, #E22850) !important; - outline-offset: -1px !important; + &[status="notfound"] { + outline: 2px solid var(--input-error-border-color, #E22850) !important; + outline-offset: -1px !important; + } } +/* Prevent focus outline from being cut off on the findbar textbox. */ .findbar-container { overflow-inline: visible !important; + + /* Add ability to drag window from empty space in the findbar. */ + &::after { + content: ""; + flex: 1; + align-self: stretch; + margin-block: -6px; + -moz-window-dragging: drag; + } } -.close-icon:not([disabled]):hover, -.findbar-find-previous:not([disabled]):hover, -.findbar-find-next:not([disabled]):hover { - background: var(--toolbarbutton-hover-background, rgb(190 190 190 / .2)) !important; +/* Findbar buttons. */ +.findbar-find-previous, +.findbar-find-next, +findbar .close-icon { + border-radius: var(--toolbarbutton-border-radius) !important; + + &:not([disabled]):hover { + background-color: var(--toolbarbutton-hover-background, rgb(190 190 190 / .2)) !important; + + &:active { + background-color: var(--toolbarbutton-active-background, rgb(190 190 190 / .4)) !important; + } + } } -.close-icon:not([disabled]):hover:active, -.findbar-find-previous:not([disabled]):hover:active, -.findbar-find-next:not([disabled]):hover:active { - background: var(--toolbarbutton-active-background, rgb(190 190 190 / .4)) !important; +/* Rounded corners optimisations. */ +@media (-moz-bool-pref: "uc.tweak.rounded-corners") { + findbar { + border: none !important; + margin-bottom: var(--uc-tweak-rounded-corners-padding, 0px) !important; + background-color: transparent !important; + padding-inline: var(--uc-tweak-rounded-corners-padding, 0px) !important; + + &[hidden] { + margin-bottom: calc(var(--uc-tweak-rounded-corners-padding, 0px) - 40px) !important; + } + } }