Skip to content

Commit

Permalink
Apply rounded corners to findbar
Browse files Browse the repository at this point in the history
  • Loading branch information
bmFtZQ committed Dec 30, 2023
1 parent 2351398 commit 239b062
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 29 deletions.
5 changes: 3 additions & 2 deletions chrome/global/browser.css
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down Expand Up @@ -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;
Expand Down
79 changes: 52 additions & 27 deletions chrome/toolbar/findbar.css
Original file line number Diff line number Diff line change
@@ -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;
}
}
}

0 comments on commit 239b062

Please sign in to comment.