|
29 | 29 |
|
30 | 30 | /* Glow outline when hovering over the unfocused urlbar */ |
31 | 31 | #urlbar:not(.megabar):not([focused]):not([breakout-extend]) { |
32 | | - @media -moz-pref("uc.flex.style-urlbar", 2) or -moz-pref("uc.flex.style-urlbar", 3) or -moz-pref("uc.flex.style-urlbar", 4) { |
33 | | - .urlbar-input-container { |
34 | | - border-radius: var(--uc-urlbar-border-radius, var(--toolbarbutton-border-radius)) !important; |
35 | | - transition: box-shadow 0.25s ease-out; |
36 | | - } |
| 32 | + .urlbar-input-container { |
| 33 | + border-radius: var(--uc-urlbar-border-radius, var(--toolbarbutton-border-radius)) !important; |
| 34 | + transition: box-shadow 0.25s ease-out; |
37 | 35 | } |
38 | 36 | &:hover { |
39 | | - outline: 1px solid var(--uc-urlbar-outline); |
40 | 37 | :where(#urlbar-background, .urlbar-background) { |
41 | 38 | box-shadow: none !important; |
42 | 39 | } |
43 | | - @media -moz-pref("uc.flex.style-urlbar", 2) or -moz-pref("uc.flex.style-urlbar", 3) or -moz-pref("uc.flex.style-urlbar", 4) { |
44 | | - outline: none; |
| 40 | + |
| 41 | + .urlbar-input-container { |
| 42 | + box-shadow: |
| 43 | + 0px 0px 5px -2px rgba(12, 12, 16, 0.8), |
| 44 | + 0 0 0 1px rgb(from var(--uc-urlbar-outline) r g b / 0.93) !important; |
| 45 | + } |
| 46 | + @media (prefers-color-scheme: dark) { |
45 | 47 | .urlbar-input-container { |
46 | | - box-shadow: |
47 | | - 0px 0px 5px -2px rgba(12, 12, 16, 0.8), |
48 | | - 0 0 0 1px rgb(from var(--uc-urlbar-outline) r g b / 0.93) !important; |
49 | | - } |
50 | | - @media (prefers-color-scheme: dark) { |
51 | | - .urlbar-input-container { |
52 | | - /* |
| 48 | + /* |
53 | 49 | box-shadow: |
54 | 50 | 0px 0px 8px rgb(from var(--uc-urlbar-outline) r g b / calc(alpha * 0.87)), |
55 | 51 | 0 0 0 2px rgb(from var(--uc-urlbar-outline) r g b / calc(alpha * 0.97)) !important; |
56 | 52 | */ |
57 | | - box-shadow: |
58 | | - 0px 0px 8px |
59 | | - color-mix(in srgb, color-mix(in srgb, var(--uc-urlbar-outline) 77%, white) 82%, transparent), |
60 | | - 0 0 0 2px |
61 | | - color-mix(in srgb, color-mix(in srgb, var(--uc-urlbar-outline) 87%, white) 92%, transparent) !important; |
62 | | - } |
| 53 | + box-shadow: |
| 54 | + 0px 0px 8px |
| 55 | + color-mix(in srgb, color-mix(in srgb, var(--uc-urlbar-outline) 77%, white) 82%, transparent), |
| 56 | + 0 0 0 2px |
| 57 | + color-mix(in srgb, color-mix(in srgb, var(--uc-urlbar-outline) 87%, white) 92%, transparent) !important; |
63 | 58 | } |
64 | 59 | } |
65 | 60 | } |
|
201 | 196 | --uc-urlbar-icon-radius, |
202 | 197 | var(--urlbar-icon-border-radius, var(--urlbar-inner-border-radius)) |
203 | 198 | ) !important; |
204 | | - @media not -moz-pref("uc.flex.style-urlbar", 0) { |
205 | | - background-color: var(--uc-identity-btn-bgcolor) !important; |
206 | | - opacity: 0.8; |
207 | | - } |
| 199 | + background-color: var(--uc-identity-btn-bgcolor) !important; |
| 200 | + opacity: 0.8; |
208 | 201 | } |
209 | 202 |
|
210 | 203 | #identity-icon-box.identity-box-button:hover, |
211 | 204 | #trust-icon-container:hover { |
212 | 205 | cursor: pointer; |
213 | | - @media not -moz-pref("uc.flex.style-urlbar", 0) { |
214 | | - background-color: var(--identity-btn-hover-color, var(--urlbar-box-hover-bgcolor)) !important; |
215 | | - } |
| 206 | + background-color: var(--identity-btn-hover-color, var(--urlbar-box-hover-bgcolor)) !important; |
216 | 207 | } |
217 | 208 |
|
218 | 209 | /* Track protection icon */ |
|
390 | 381 |
|
391 | 382 | /* Show URL buttons on Hover */ |
392 | 383 | /* !v143 */ |
| 384 | +/* |
393 | 385 | @media not (-moz-pref("uc.flex.style-urlbar", 0) or -moz-pref("uc.flex.style-urlbar", 2) or -moz-pref("uc.flex.style-urlbar", 3) or -moz-pref("uc.flex.style-urlbar", 4)) { |
394 | 386 | #nav-bar:not([customizing="true"]):not([customizing=""]) |
395 | 387 | > #nav-bar-customization-target |
|
426 | 418 | transition: opacity var(--uc-hover-navbar-icons-duration) var(--uc-autohide-navbar-icons-type); |
427 | 419 | } |
428 | 420 | } |
| 421 | +*/ |
429 | 422 |
|
430 | | -/** |
431 | | - * When the web content is an extension page, #identity-box.extensionPage becomes visible. |
432 | | - * In this case, we hide the trust icon to save space. As with similar cases elsewhere, |
433 | | - * we define variables on the parent element and pass them to #trust-icon-container, |
434 | | - * instead of directly styling the child inside :has(). This avoids unnecessary |
435 | | - * performance costs from selector evaluation. |
436 | | - */ |
| 423 | +/* Hide the Trust Panel icon */ |
437 | 424 | @media -moz-pref("browser.urlbar.trustPanel.featureGate") { |
438 | | - .urlbar-input-container:has(> .extensionPage) { |
439 | | - --uc-trust-icon-margin-inline-start: calc(-19px - 2 * var(--urlbar-icon-padding)); |
440 | | - --uc-trust-icon-bgcolor: transparent; |
441 | | - --uc-trust-icon-opacity: 0; |
442 | | - } |
443 | | - @media not -moz-pref("uc.flex.style-urlbar", 0) { |
444 | | - #trust-icon-container { |
445 | | - background-color: var(--uc-trust-icon-bgcolor, var(--uc-identity-btn-bgcolor)) !important; |
| 425 | + .urlbar-input-container { |
| 426 | + @media -moz-pref("uc.flex.style-urlbar", 4) { |
| 427 | + --uc-trust-icon-margin-inline-start: calc(-19px - 2 * var(--urlbar-icon-padding)); |
| 428 | + --uc-trust-icon-opacity: 0; |
| 429 | + } |
| 430 | + /** |
| 431 | + * When the web content is an extension page, #identity-box.extensionPage becomes visible. |
| 432 | + * In this case, we hide the trust icon to save space. As with similar cases elsewhere, |
| 433 | + * we define variables on the parent element and pass them to #trust-icon-container, |
| 434 | + * instead of directly styling the child inside :has(). This avoids unnecessary |
| 435 | + * performance costs from selector evaluation. |
| 436 | + */ |
| 437 | + &:has(> .extensionPage) { |
| 438 | + --uc-trust-icon-margin-inline-start: calc(-19px - 2 * var(--urlbar-icon-padding)); |
| 439 | + --uc-trust-icon-bgcolor: transparent; |
| 440 | + --uc-trust-icon-opacity: 0; |
446 | 441 | } |
447 | 442 | } |
| 443 | + #trust-icon-container { |
| 444 | + background-color: var(--uc-trust-icon-bgcolor, var(--uc-identity-btn-bgcolor)) !important; |
| 445 | + } |
448 | 446 | } |
449 | 447 |
|
450 | | -@media -moz-pref("uc.flex.style-urlbar", 2) or -moz-pref("uc.flex.style-urlbar", 3) or -moz-pref("uc.flex.style-urlbar", 4) { |
451 | | - #urlbar:not([breakout][breakout-extend], [focused][usertyping]) { |
| 448 | +#urlbar:not([breakout][breakout-extend], [focused][usertyping]) { |
| 449 | + /* Center the URL bar text */ |
| 450 | + @media -moz-pref("uc.flex.style-urlbar-center-text") { |
452 | 451 | .urlbar-input { |
453 | 452 | text-align: center !important; |
454 | 453 | margin-bottom: 1px !important; |
|
491 | 490 | } |
492 | 491 | } |
493 | 492 | } |
| 493 | + } |
494 | 494 |
|
| 495 | + /* Hide URL bar icons */ |
| 496 | + @media not -moz-pref("uc.flex.auto-hide-urlbar-icons", false), -moz-pref("uc.flex.style-urlbar", 4) { |
495 | 497 | #identity-permission-box, |
496 | 498 | #notification-popup-box, |
497 | 499 | #tracking-protection-icon-container { |
|
513 | 515 | display: none; |
514 | 516 | } |
515 | 517 |
|
516 | | - @media -moz-pref("uc.flex.style-urlbar", 2) or -moz-pref("uc.flex.style-urlbar", 3) { |
| 518 | + @media not -moz-pref("uc.flex.style-urlbar", 4) { |
517 | 519 | .urlbar-page-action:where(:not(#star-button-box, [open])) { |
518 | 520 | margin-inline-end: calc(-16px - 2 * var(--urlbar-icon-padding)); |
519 | 521 | opacity: 0; |
|
548 | 550 | } |
549 | 551 |
|
550 | 552 | @media -moz-pref("uc.flex.style-urlbar", 4) { |
551 | | - &[open] :where(#identity-icon-box, #trust-icon-container), |
552 | | - &:hover :where(#identity-icon-box, #trust-icon-container), |
553 | | - :where(#identity-icon-box[open], #trust-icon-container[open]) { |
554 | | - opacity: 1; |
555 | | - margin-inline-start: 0 !important; |
| 553 | + &[open] :is(#identity-icon-box, #trust-icon-container), |
| 554 | + &:hover :is(#identity-icon-box, #trust-icon-container), |
| 555 | + :is(#identity-icon-box[open], #trust-icon-container[open]) { |
| 556 | + opacity: 0.8; |
| 557 | + margin-inline-start: 3px !important; |
556 | 558 | } |
557 | 559 | } |
558 | 560 |
|
|
571 | 573 | } |
572 | 574 | } |
573 | 575 |
|
574 | | - @media -moz-pref("uc.flex.style-urlbar", 2) or -moz-pref("uc.flex.style-urlbar", 3) { |
| 576 | + @media not -moz-pref("uc.flex.style-urlbar", 4) { |
575 | 577 | &:-moz-window-inactive:hover .urlbar-page-action:not(#star-button-box), |
576 | 578 | &:-moz-window-inactive:hover #identity-permission-box, |
577 | 579 | &:-moz-window-inactive:hover #notification-popup-box { |
|
0 commit comments