Fix menulist popup item padding and icon on MacOS and Windows

A follow up fix after #4052
Default to radio style menuitem on MacOS and Windows
This commit is contained in:
windingwind 2024-05-02 15:19:45 +08:00
parent debcb9944d
commit 4a0bb2df52
2 changed files with 35 additions and 5 deletions

View file

@ -35,6 +35,7 @@ menupopup {
} }
} }
menulist > &,
&[needsgutter] { &[needsgutter] {
menu, menuitem { menu, menuitem {
padding-left: 20px; padding-left: 20px;

View file

@ -41,11 +41,40 @@ menupopup {
menuitem:is([checked="true"]):is([type="radio"]) > .menu-iconic-left { menuitem:is([checked="true"]):is([type="radio"]) > .menu-iconic-left {
list-style-image: url("chrome://zotero/skin/win/menu-radio.svg"); list-style-image: url("chrome://zotero/skin/win/menu-radio.svg");
} }
}
menulist {
menupopup {
menu, menuitem {
.menu-iconic-left {
display: flex;
}
}
menulist > menupopup > menuitem > .menu-iconic-left, menu:not([icon], .menu-iconic),
menulist > menupopup > menucaption > .menu-iconic-left, menuitem:not([checked="true"], [icon], .menuitem-iconic) {
menulist > menupopup > menu > .menu-iconic-left { padding-inline-start: 36px;
display: unset; }
menuitem {
.menu-iconic-icon {
display: none;
}
}
menuitem[selected="true"] {
padding-inline-start: 12px !important;
& > .menu-iconic-left {
-moz-context-properties: fill, fill-opacity;
fill: currentColor;
fill-opacity: var(--menu-icon-opacity);
list-style-image: url("chrome://zotero/skin/win/menu-radio.svg");
width: 16px;
margin-inline-end: 8px;
& > .menu-iconic-icon {
display: initial;
}
}
}
}
}
} }