Skip to content

Commit

Permalink
Fix: Compatibility - Win10 nativemenu at bookmarkmenu #541
Browse files Browse the repository at this point in the history
  • Loading branch information
black7375 committed Dec 29, 2022
1 parent 6c5124f commit 9035429
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 19 deletions.
28 changes: 16 additions & 12 deletions css/leptonChrome.css
Original file line number Diff line number Diff line change
Expand Up @@ -271,13 +271,13 @@
}
}
@media (-moz-os-version: windows-win7), (-moz-platform: windows-win7) {
menupopup:not(#BMB_bookmarksPopup) menu[_moz-menuactive="true"],
menupopup:not(#BMB_bookmarksPopup) menuitem[_moz-menuactive="true"] {
menu[_moz-menuactive="true"],
menuitem[_moz-menuactive="true"] {
background-color: color-mix(in srgb, -moz-menuhover 5%, transparent) !important;
border-color: color-mix(in srgb, -moz-menuhover 60%, transparent) !important;
}
menupopup:not(#BMB_bookmarksPopup) menu[_moz-menuactive="true"][disabled="true"],
menupopup:not(#BMB_bookmarksPopup) menuitem[_moz-menuactive="true"][disabled="true"] {
menu[_moz-menuactive="true"][disabled="true"],
menuitem[_moz-menuactive="true"][disabled="true"] {
background-color: color-mix(in srgb, currentColor 5%, transparent) !important;
border-color: color-mix(in srgb, currentColor 60%, transparent) !important;
}
Expand All @@ -293,27 +293,31 @@
}
}
@media (-moz-os-version: windows-win8), (-moz-platform: windows-win8) {
menupopup:not(#BMB_bookmarksPopup) menu[_moz-menuactive="true"],
menupopup:not(#BMB_bookmarksPopup) menuitem[_moz-menuactive="true"] {
menu[_moz-menuactive="true"],
menuitem[_moz-menuactive="true"] {
background-color: color-mix(in srgb, -moz-menuhover 17%, transparent) !important;
border-color: color-mix(in srgb, -moz-menuhover 80%, transparent) !important;
}
menupopup:not(#BMB_bookmarksPopup) menu[_moz-menuactive="true"][disabled="true"],
menupopup:not(#BMB_bookmarksPopup) menuitem[_moz-menuactive="true"][disabled="true"] {
menu[_moz-menuactive="true"][disabled="true"],
menuitem[_moz-menuactive="true"][disabled="true"] {
background-color: color-mix(in srgb, currentColor 17%, transparent) !important;
border-color: color-mix(in srgb, currentColor 80%, transparent) !important;
}
}
/*= Windows 10 - Native Menu Active Color =====================================*/
@media (-moz-os-version: windows-win10), (-moz-platform: windows-win10) {
@media not (-moz-windows-non-native-menus) {
menu[_moz-menuactive="true"],
menuitem[_moz-menuactive="true"] {
menupopup:is(#historyMenuPopup, #bookmarksMenuPopup) menu[_moz-menuactive="true"],
menupopup:not([placespopup="true"]) menu[_moz-menuactive="true"],
menupopup:is(#historyMenuPopup, #bookmarksMenuPopup) menuitem[_moz-menuactive="true"],
menupopup:not([placespopup="true"]) menuitem[_moz-menuactive="true"] {
background-color: #91c9f7 !important;
border-color: transparent !important;
}
menu[_moz-menuactive="true"][disabled="true"],
menuitem[_moz-menuactive="true"][disabled="true"] {
menupopup:is(#historyMenuPopup, #bookmarksMenuPopup) menu[_moz-menuactive="true"][disabled="true"],
menupopup:not([placespopup="true"]) menu[_moz-menuactive="true"][disabled="true"],
menupopup:is(#historyMenuPopup, #bookmarksMenuPopup) menuitem[_moz-menuactive="true"][disabled="true"],
menupopup:not([placespopup="true"]) menuitem[_moz-menuactive="true"][disabled="true"] {
background-color: color-mix(in srgb, currentColor 9%, transparent) !important;
border-color: transparent !important;
}
Expand Down
17 changes: 10 additions & 7 deletions src/compatibility/_os.scss
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@

//-- Mixin ---------------------------------------------------------------------
@mixin _os_menuEmulate($bgRate, $bdRate) {
menupopup:not(#BMB_bookmarksPopup) menu[_moz-menuactive="true"],
menupopup:not(#BMB_bookmarksPopup) menuitem[_moz-menuactive="true"] {
menu[_moz-menuactive="true"],
menuitem[_moz-menuactive="true"] {
background-color: color-mix(in srgb, -moz-menuhover $bgRate, transparent) !important;
border-color: color-mix(in srgb, -moz-menuhover $bdRate, transparent) !important;

Expand Down Expand Up @@ -127,12 +127,15 @@
@include Win10_NativeMenu() {
menu[_moz-menuactive="true"],
menuitem[_moz-menuactive="true"] {
background-color: #91c9f7 !important; // color-mix(in srgb, -moz-menuhover 40%, transparent)
border-color: transparent !important;

&[disabled="true"] {
background-color: color-mix(in srgb, currentColor 9%, transparent) !important;
menupopup:is(#historyMenuPopup, #bookmarksMenuPopup) &,
menupopup:not([placespopup="true"]) & {
background-color: #91c9f7 !important; // color-mix(in srgb, -moz-menuhover 40%, transparent)
border-color: transparent !important;

&[disabled="true"] {
background-color: color-mix(in srgb, currentColor 9%, transparent) !important;
border-color: transparent !important;
}
}
}
}
Expand Down

0 comments on commit 9035429

Please sign in to comment.