/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* Scroll buttons */ /* Hide arrow buttons when there's nothing to scroll in that direction */ .menupopup-arrowscrollbox[scrolledtostart="true"]::part(scrollbutton-up), .menupopup-arrowscrollbox[scrolledtoend="true"]::part(scrollbutton-down) { display: none; } /* 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 * arrowscrollbox regardless of scroll button visibility. */ .menupopup-arrowscrollbox:not([scrolledtostart="true"])::part(scrollbox) { /* scrollbutton-up is visible; shift our top edge up by its height. */ margin-top: -16px; } .menupopup-arrowscrollbox:not([scrolledtoend="true"])::part(scrollbox) { /* scrollbutton-down is visible; shift our bottom edge down by its height. */ margin-bottom: -16px; } .menupopup-arrowscrollbox::part(scrollbox-clip) { /* In the space where the arrow buttons overlap the scrollbox, clip away the * scrollbox so that nothing is shown behind the arrow button even if the * button is transparent. */ overflow: clip; }