summaryrefslogtreecommitdiffstats
path: root/toolkit/themes/linux/global/popup.css
blob: 2994dbebc8927b2241caf36872e17bbe9d0a456e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/* 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 ::::: */

menupopup,
panel {
  appearance: auto;
  -moz-default-appearance: menupopup;
  min-width: 1px;
  color: MenuText;
}

/* ::::: arrow panel ::::: */

panel[type="arrow"] {
  appearance: none;
}

panel[type="arrow"][side="top"],
panel[type="arrow"][side="bottom"] {
  margin-inline: -20px;
}

panel[type="arrow"][side="left"],
panel[type="arrow"][side="right"] {
  margin-block: -20px;
}

.panel-arrowcontent {
  padding: var(--arrowpanel-padding);
  color: var(--arrowpanel-color);
  background: var(--arrowpanel-background);
  border: 1px solid var(--arrowpanel-border-color);
  box-shadow: 0 0 4px hsla(0,0%,0%,.2);
  margin: 4px;
}

.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 */
}

: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),
:is(panel, menupopup)[side="bottom"]::part(arrow) {
  list-style-image: url("chrome://global/skin/arrow/panelarrow-vertical.svg");
  position: relative;
  margin-inline: 10px;
}

:is(panel, menupopup)[side="top"]::part(arrow) {
  margin-bottom: -5px;
}

:is(panel, menupopup)[side="bottom"]::part(arrow) {
  transform: scaleY(-1);
  margin-top: -5px;
}

:is(panel, menupopup)[side="left"]::part(arrow),
:is(panel, menupopup)[side="right"]::part(arrow) {
  list-style-image: url("chrome://global/skin/arrow/panelarrow-horizontal.svg");
  position: relative;
  margin-block: 10px;
}

:is(panel, menupopup)[side="left"]::part(arrow) {
  margin-right: -5px;
}

:is(panel, menupopup)[side="right"]::part(arrow) {
  transform: scaleX(-1);
  margin-left: -5px;
}

/* rules for popups associated with menulists */

menulist > menupopup {
  padding: 0;
  min-width: 0;
}

menupopup[customoptionstyling="true"] {
  appearance: none;
}