diff options
Diffstat (limited to 'toolkit/themes/osx/global/popup.css')
-rw-r--r-- | toolkit/themes/osx/global/popup.css | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/toolkit/themes/osx/global/popup.css b/toolkit/themes/osx/global/popup.css new file mode 100644 index 0000000000..0888d8647b --- /dev/null +++ b/toolkit/themes/osx/global/popup.css @@ -0,0 +1,117 @@ +/* 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"); +@namespace html url("http://www.w3.org/1999/xhtml"); + +menupopup, +panel { + appearance: auto; + -moz-default-appearance: menupopup; + -moz-font-smoothing-background-color: -moz-mac-menupopup; + background-color: Menu; + color: MenuText; +} + +menupopup > menu > menupopup { + margin-top: -4px; +} + +.menupopup-arrowscrollbox { + padding: 4px 0; +} + +panel[titlebar] { + appearance: none; /* to disable rounded corners */ +} + +panel[type="arrow"] { + appearance: none; + background: transparent; +} + +panel[type="arrow"][side="top"], +panel[type="arrow"][side="bottom"] { + margin-inline: -25px; +} + +panel[type="arrow"][side="left"], +panel[type="arrow"][side="right"] { + margin-block: -25px; +} + +.panel-arrowcontent { + appearance: none; + -moz-font-smoothing-background-color: var(--arrowpanel-background); + background: var(--arrowpanel-background); + border-radius: var(--arrowpanel-border-radius); + box-shadow: 0 0 0 1px var(--arrowpanel-border-color); + color: var(--arrowpanel-color); + border: none; + padding: var(--arrowpanel-padding); + margin: 1px; +} + +.panel-arrowcontent > html|slot { + /* propagate border-radius from arrowcontent to slotted children */ + border-radius: inherit; +} + +:host([orient=vertical]) .panel-arrowcontent { + -moz-box-orient: vertical; +} + +panel[type="arrow"].panel-no-padding::part(arrowcontent) { + padding: 0; + overflow: hidden; /* Don't let panel content overflow the border-radius */ +} + +:is(panel, menupopup)::part(arrow) { + -moz-context-properties: fill, stroke; + fill: var(--arrowpanel-background); + stroke: var(--arrowpanel-border-color); +} + +:is(panel, menupopup)[side="top"]::part(arrow) { + list-style-image: url("chrome://global/skin/arrow/panelarrow-vertical.svg"); + margin-inline: 16px; + margin-bottom: -1px; +} + +:is(panel, menupopup)[side="bottom"]::part(arrow) { + list-style-image: url("chrome://global/skin/arrow/panelarrow-vertical.svg"); + -moz-transform: scaleY(-1); + margin-inline: 16px; + margin-top: -1px; +} + +:is(panel, menupopup)[side="left"]::part(arrow) { + list-style-image: url("chrome://global/skin/arrow/panelarrow-horizontal.svg"); + margin-block: 16px; + margin-right: -1px; +} + +:is(panel, menupopup)[side="right"]::part(arrow) { + list-style-image: url("chrome://global/skin/arrow/panelarrow-horizontal.svg"); + transform: scaleX(-1); + margin-block: 16px; + margin-left: -1px; +} + +/* rules for popups associated with menulists */ + +menulist > menupopup { + min-width: 0; + padding: 4px 0; +} + +menulist > menupopup:not([position]) { + margin-inline-start: -13px; + margin-top: -2px; +} + +menupopup[customoptionstyling="true"] { + appearance: none; + padding-block: 0; +} |