Bug 1862237 - Reset macOS menuitem spacing in toolbar menus. r=desktop-theme-reviewers,dao

Differential Revision: https://phabricator.services.mozilla.com/D192347
This commit is contained in:
Emilio Cobos Álvarez 2023-11-01 10:56:10 +00:00
parent 29531c0f31
commit 53234dc5bd
3 changed files with 20 additions and 15 deletions

View file

@ -249,6 +249,11 @@ toolbarseparator + .panel-subview-body {
margin-top: calc(-1 * (var(--panel-subview-body-padding-block) + var(--panel-shadow-margin) + 1px));
}
menuitem::before,
menuitem::after {
content: none; /* Reset's macOS' checkmark spacing */
}
:is(menu, menuitem)[disabled] {
color: var(--panel-disabled-color);
}

View file

@ -12,9 +12,9 @@ xul|tabs {
position: static;
}
xul|menulist > xul|menupopup > xul|menuitem::after,
xul|menulist > xul|menupopup > xul|menuitem::before {
display: none;
xul|menupopup > xul|menuitem::after,
xul|menupopup > xul|menuitem::before {
content: none;
}
xul|menulist > xul|menupopup xul|menu,

View file

@ -94,19 +94,19 @@ menulist > menupopup > menu {
menupopup > menuitem {
padding-inline: 0;
}
/* We only show the ::before pseudo-element, but we'd like the spacing to be
* symmetric, so we render an invisible checkmark on both sides in order to
* reserve the right amount of space. */
menupopup > menuitem::after,
menupopup > menuitem::before {
content: '\2713'; /* a checkmark */
display: inline-block;
vertical-align: middle;
line-height: 0;
visibility: hidden;
padding-inline: 4px;
/* We only show the ::before pseudo-element, but we'd like the spacing to be
* symmetric, so we render an invisible checkmark on both sides in order to
* reserve the right amount of space. */
&::before,
&::after {
content: '\2713'; /* a checkmark */
display: inline-block;
vertical-align: middle;
line-height: 0;
visibility: hidden;
padding-inline: 4px;
}
}
menupopup > menuitem:is([checked="true"], [selected="true"])::before {