Skip to content

Commit

Permalink
Fix: Autohide - Apply at brower.xhtml #575
Browse files Browse the repository at this point in the history
  • Loading branch information
black7375 committed Jan 17, 2023
1 parent 8d33712 commit 7f5f28b
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 30 deletions.
53 changes: 28 additions & 25 deletions css/leptonChrome.css
Original file line number Diff line number Diff line change
Expand Up @@ -8736,35 +8736,38 @@
);
}
}
@supports -moz-bool-pref("userChrome.autohide.back_button") {
#back-button[disabled="true"] {
margin-left: var(--uc-toolbarbutton-hide-size) !important;
opacity: 0 !important;
pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
#back-button {
transition-property: background-color, opacity, margin-left !important;
}
@-moz-document url("chrome://browser/content/browser.xhtml")
{
@supports -moz-bool-pref("userChrome.autohide.back_button") {
#back-button[disabled="true"] {
transition: background-color 1s var(--animation-easing-function), opacity 1s var(--animation-easing-function),
margin-left 0.5s ease !important;
margin-left: var(--uc-toolbarbutton-hide-size) !important;
opacity: 0 !important;
pointer-events: none;
}
}
}
@supports -moz-bool-pref("userChrome.autohide.forward_button") {
#forward-button[disabled="true"] {
margin-left: var(--uc-toolbarbutton-hide-size) !important;
opacity: 0 !important;
pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
#forward-button {
transition-property: background-color, opacity, margin-left !important;
@media (prefers-reduced-motion: no-preference) {
#back-button {
transition-property: background-color, opacity, margin-left !important;
}
#back-button[disabled="true"] {
transition: background-color 1s var(--animation-easing-function), opacity 1s var(--animation-easing-function),
margin-left 0.5s ease !important;
}
}
}
@supports -moz-bool-pref("userChrome.autohide.forward_button") {
#forward-button[disabled="true"] {
transition: background-color 1s var(--animation-easing-function), opacity 1s var(--animation-easing-function),
margin-left 0.5s ease !important;
margin-left: var(--uc-toolbarbutton-hide-size) !important;
opacity: 0 !important;
pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
#forward-button {
transition-property: background-color, opacity, margin-left !important;
}
#forward-button[disabled="true"] {
transition: background-color 1s var(--animation-easing-function), opacity 1s var(--animation-easing-function),
margin-left 0.5s ease !important;
}
}
}
}
Expand Down
13 changes: 8 additions & 5 deletions src/autohide/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@
}
}

@include Option("userChrome.autohide.back_button") {
@import "back_button";
}
@include Option("userChrome.autohide.forward_button") {
@import "forward_button";
@include moz-document(url "chrome://browser/content/browser.xhtml")
{
@include Option("userChrome.autohide.back_button") {
@import "back_button";
}
@include Option("userChrome.autohide.forward_button") {
@import "forward_button";
}
}
@include Option("userChrome.autohide.page_action") {
@import "page_action";
Expand Down

0 comments on commit 7f5f28b

Please sign in to comment.