x
1
2
3
4
5
<div data-view-component="true" class="Popover position-relative right-0 left-0"> <div data-view-component="true" class="Popover-message Box Popover-message--large p-4 mt-2 mx-auto text-left"> This is a large Popover body. </div></div>
1
2
3
4
5
render Primer::Beta::Popover.new do |component| component.with_body(large: true) do "This is a large Popover body." endend
No notes provided.
No params configured.
app/components/primer/beta/popover.css
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
/* stylelint-disable primer/spacing *//* Popover */.Popover { position: absolute; z-index: 100;}.Popover-message { position: relative; width: 232px; margin-right: auto; margin-left: auto; background-color: var(--overlay-bgColor); border: var(--borderWidth-thin) solid var(--borderColor-default); border-radius: var(--borderRadius-medium); /* adding !important to override utility classes used in dotcom */ box-shadow: var(--shadow-floating-legacy, var(--color-shadow-large)) !important; /* Carets */}.Popover-message::before,.Popover-message::after { position: absolute; left: 50%; display: inline-block; content: ''; }.Popover-message::before { top: -16px; margin-left: -9px; /* stylelint-disable-next-line primer/borders */ border: 8px solid transparent; border-bottom-color: var(--borderColor-default); }.Popover-message::after { top: -14px; margin-left: -8px; /* stylelint-disable-next-line primer/borders */ border: 7px solid transparent; border-bottom-color: var(--overlay-bgColor); }/* No caret */.Popover-message--no-caret::before,.Popover-message--no-caret::after { display: none; }/* Bottom-oriented carets */:is(.Popover-message--bottom,.Popover-message--bottom-right,.Popover-message--bottom-left)::before,:is(.Popover-message--bottom,.Popover-message--bottom-right,.Popover-message--bottom-left)::after { top: auto; border-bottom-color: transparent; }:is(.Popover-message--bottom,.Popover-message--bottom-right,.Popover-message--bottom-left)::before { bottom: -16px; border-top-color: var(--borderColor-default); }:is(.Popover-message--bottom,.Popover-message--bottom-right,.Popover-message--bottom-left)::after { bottom: -14px; border-top-color: var(--overlay-bgColor); }/* Top and Bottom: Right-oriented carets */.Popover-message--top-right,.Popover-message--bottom-right { right: -9px; margin-right: 0;}:is(.Popover-message--top-right,.Popover-message--bottom-right)::before,:is(.Popover-message--top-right,.Popover-message--bottom-right)::after { left: auto; margin-left: 0; }:is(.Popover-message--top-right,.Popover-message--bottom-right)::before { right: var(--base-size-20); }:is(.Popover-message--top-right,.Popover-message--bottom-right)::after { right: var(--base-size-20); }/* Top and Bottom: Left-oriented carets */.Popover-message--top-left,.Popover-message--bottom-left { left: -9px; margin-left: 0;}:is(.Popover-message--top-left,.Popover-message--bottom-left)::before,:is(.Popover-message--top-left,.Popover-message--bottom-left)::after { left: var(--base-size-24); margin-left: 0; }:is(.Popover-message--top-left,.Popover-message--bottom-left)::after { left: var(--base-size-24); }/* Right- and Left-oriented carets */:is(.Popover-message--right,.Popover-message--right-top,.Popover-message--right-bottom,.Popover-message--left,.Popover-message--left-top,.Popover-message--left-bottom)::before,:is(.Popover-message--right,.Popover-message--right-top,.Popover-message--right-bottom,.Popover-message--left,.Popover-message--left-top,.Popover-message--left-bottom)::after { top: 50%; left: auto; margin-left: 0; border-bottom-color: transparent; }:is(.Popover-message--right,.Popover-message--right-top,.Popover-message--right-bottom,.Popover-message--left,.Popover-message--left-top,.Popover-message--left-bottom)::before { margin-top: -9px; }:is(.Popover-message--right,.Popover-message--right-top,.Popover-message--right-bottom,.Popover-message--left,.Popover-message--left-top,.Popover-message--left-bottom)::after { margin-top: -8px; }/* Right-oriented carets */:is(.Popover-message--right,.Popover-message--right-top,.Popover-message--right-bottom)::before { right: -16px; border-left-color: var(--borderColor-default); }:is(.Popover-message--right,.Popover-message--right-top,.Popover-message--right-bottom)::after { right: -14px; border-left-color: var(--overlay-bgColor); }/* Left-oriented carets */:is(.Popover-message--left,.Popover-message--left-top,.Popover-message--left-bottom)::before { left: -16px; border-right-color: var(--borderColor-default); }:is(.Popover-message--left,.Popover-message--left-top,.Popover-message--left-bottom)::after { left: -14px; border-right-color: var(--overlay-bgColor); }/* Right and Left: Top-oriented carets */:is(.Popover-message--right-top,.Popover-message--left-top)::before,:is(.Popover-message--right-top,.Popover-message--left-top)::after { top: var(--base-size-24); }/* Right and Left: Bottom-oriented carets */:is(.Popover-message--right-bottom,.Popover-message--left-bottom)::before,:is(.Popover-message--right-bottom,.Popover-message--left-bottom)::after { top: auto; }:is(.Popover-message--right-bottom,.Popover-message--left-bottom)::before { bottom: var(--base-size-16); }:is(.Popover-message--right-bottom,.Popover-message--left-bottom)::after { bottom: var(--base-size-16); }@media (min-width: 544px) { .Popover-message--large { min-width: 320px; }}/* Responsive Popover** For < md it will show full-width anchored to the bottom */@media (max-width: 767.98px) { .Popover { position: fixed; top: auto !important; right: 0 !important; bottom: 0 !important; left: 0 !important; } .Popover-message { top: auto; right: auto; bottom: auto; left: auto; width: auto !important; margin: var(--stack-gap-condensed); } /* Increase tap area for touch input */ .Popover-message > .btn-octicon { padding: var(--control-medium-paddingInline-normal) !important; } /* Remove caret */ .Popover-message::after, .Popover-message::before { display: none; }}