forked from mirrors/gecko-dev
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:
parent
29531c0f31
commit
53234dc5bd
3 changed files with 20 additions and 15 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -94,13 +94,12 @@ 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 {
|
||||
&::before,
|
||||
&::after {
|
||||
content: '\2713'; /* a checkmark */
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
|
|
@ -108,6 +107,7 @@ menupopup > menuitem::before {
|
|||
visibility: hidden;
|
||||
padding-inline: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
menupopup > menuitem:is([checked="true"], [selected="true"])::before {
|
||||
visibility: inherit;
|
||||
|
|
|
|||
Loading…
Reference in a new issue