commit e28965f40ca1095a78c35b02a62f8429ea46bd11
parent f21d081a20649340b7b1a30c0fddb82e220b22ab
Author: Emilio Cobos Álvarez <emilio@crisal.io>
Date: Tue, 30 Sep 2025 18:01:08 +0000
Bug 1991652 - Don't use overflow-clip-box-block to implement menu arrows. r=desktop-theme-reviewers,dao
It can just be a transparent border rather than using an internal
property.
This is needed to remove the internal property, as you may imagine.
Differential Revision: https://phabricator.services.mozilla.com/D266797
Diffstat:
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/toolkit/content/widgets/menupopup.css b/toolkit/content/widgets/menupopup.css
@@ -12,4 +12,7 @@
overscroll-behavior: none;
margin: 0;
padding: 0;
+ /* See bug 1991745 for the ignore below */
+ /* stylelint-disable-next-line stylelint-plugin-mozilla/use-border-color-tokens */
+ border: 0;
}
diff --git a/toolkit/themes/shared/menu.css b/toolkit/themes/shared/menu.css
@@ -135,11 +135,6 @@ menuseparator {
display: none;
}
-.menupopup-arrowscrollbox::part(scrollbox) {
- /* This makes the padding / margin trick below work */
- overflow-clip-box-block: content-box;
-}
-
/* Prevent the scrolled contents of the menupopup from jumping vertically when
* the arrow buttons appear / disappear, by positioning ::part(scrollbox) in
* such a way that its edges are at the same position as the edges of
@@ -148,13 +143,13 @@ menuseparator {
.menupopup-arrowscrollbox:not([scrolledtostart])::part(scrollbox) {
/* scrollbutton-up is visible; shift our top edge up by its height. */
margin-top: -16px;
- padding-top: 16px;
+ border-top: 16px solid transparent;
}
.menupopup-arrowscrollbox:not([scrolledtoend])::part(scrollbox) {
/* scrollbutton-down is visible; shift our bottom edge down by its height. */
margin-bottom: -16px;
- padding-bottom: 16px;
+ border-bottom: 16px solid transparent;
}
menubar {