Skip to content

Commit

Permalink
Add Mac hack for autorepeatbutton inside popups (untested)
Browse files Browse the repository at this point in the history
  • Loading branch information
fofajardo committed Apr 6, 2020
1 parent 4927b31 commit 09a54eb
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions src/chrome/os_target/mac/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,46 @@
* 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/. */

/* autorepeatbuttons in menus */

.popup-internal-box > autorepeatbutton {
height: 15px;
position: relative;
list-style-image: none;
/* Here we're using a little magic.
* The arrow button is supposed to overlay the scrollbox, blocking
* everything under it from reaching the screen. However, the menu background
* is slightly transparent, so how can we block something completely without
* messing up the transparency? It's easy: The native theming of the
* "menuitem" appearance uses CGContextClearRect before drawing, which
* clears everything under it.
* Without help from native theming this effect wouldn't be achievable.
*/
-moz-appearance: menuitem;
}

.popup-internal-box > .autorepeatbutton-up {
padding-top: 1px; /* 4px padding-top from the .popup-internal-box. */
margin-bottom: -15px;
}

.popup-internal-box > .autorepeatbutton-up > .autorepeatbutton-icon {
-moz-appearance: button-arrow-up;
}

.popup-internal-box > .autorepeatbutton-down {
padding-top: 5px;
margin-top: -15px;
}

.popup-internal-box > .autorepeatbutton-down > .autorepeatbutton-icon {
-moz-appearance: button-arrow-down;
}

.popup-internal-box > autorepeatbutton[disabled="true"] {
visibility: collapse;
}

/* :::::: Close button icons ::::: */

@media (min-resolution: 2dppx) {
Expand Down

0 comments on commit 09a54eb

Please sign in to comment.