|
5 | 5 | * SPDX-License-Identifier: Apache-2.0 |
6 | 6 | */ |
7 | 7 |
|
8 | | -.cite-checkbox, |
9 | | -.cite-format-radio { |
10 | | - display: none; |
11 | | -} |
12 | | - |
13 | 8 | .citation { |
14 | 9 | display: inline-block; |
15 | 10 | margin-top: 0.5rem; |
|
34 | 29 | } |
35 | 30 | } |
36 | 31 |
|
37 | | -.cite-copy-btn { |
38 | | - font-size: 0.78rem; |
39 | | - cursor: pointer; |
40 | | -} |
41 | | - |
42 | | -// overlay |
43 | | - |
44 | | -.cite-overlay { |
45 | | - display: none; |
46 | | - position: fixed; |
47 | | - inset: 0; |
48 | | - z-index: 400; |
49 | | - background: rgba(0, 0, 0, 0.5); |
50 | | - cursor: default; |
51 | | -} |
52 | | - |
53 | | -// modal |
54 | | - |
55 | 32 | .cite-modal { |
56 | | - display: none; |
57 | | - position: fixed; |
58 | | - inset: 0; |
59 | | - z-index: 800; |
60 | | - pointer-events: none; |
61 | | - align-items: center; |
62 | | - justify-content: center; |
| 33 | + inset: 50% auto auto 50%; |
| 34 | + width: min(90vw, 640px); |
| 35 | + max-height: min(90vh, 44rem); |
| 36 | + margin: 0; |
| 37 | + padding: 0; |
| 38 | + color: var(--color-text); |
| 39 | + background: transparent; |
| 40 | + border: 0; |
| 41 | + overflow: visible; |
| 42 | + transform: translate(-50%, -50%); |
| 43 | + |
| 44 | + &::backdrop { |
| 45 | + background: rgba(0, 0, 0, 0.5); |
| 46 | + } |
63 | 47 | } |
64 | 48 |
|
65 | 49 | .cite-modal__box { |
66 | 50 | position: relative; |
| 51 | + max-height: min(90vh, 44rem); |
| 52 | + overflow-y: auto; |
67 | 53 | background: #fff; |
68 | 54 | border: 1px solid var(--borders-color); |
69 | 55 | border-radius: 8px; |
70 | 56 | padding: 1.5rem; |
71 | | - max-width: 560px; |
72 | | - width: 90%; |
73 | 57 | box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15); |
74 | | - pointer-events: auto; |
75 | 58 |
|
76 | 59 | h3 { |
77 | 60 | margin-top: 0; |
|
82 | 65 | position: absolute; |
83 | 66 | top: 0.75rem; |
84 | 67 | right: 1rem; |
85 | | - font-size: 1.25rem; |
| 68 | + padding: 0; |
86 | 69 | color: var(--color-text-light); |
87 | | - cursor: pointer; |
| 70 | + background: transparent; |
| 71 | + border: 0; |
| 72 | + font: inherit; |
| 73 | + font-size: 1.25rem; |
88 | 74 | line-height: 1; |
| 75 | + cursor: pointer; |
89 | 76 |
|
90 | 77 | &:hover { |
91 | 78 | color: var(--color-text); |
92 | 79 | } |
93 | 80 | } |
94 | 81 |
|
95 | | -.cite-checkbox:checked { |
96 | | - ~ .cite-overlay { |
97 | | - display: block; |
98 | | - } |
99 | | - |
100 | | - ~ .cite-modal { |
101 | | - display: flex; |
102 | | - } |
103 | | -} |
104 | | - |
105 | | -// tabs |
106 | | - |
107 | 82 | .cite-formats { |
| 83 | + display: grid; |
| 84 | + gap: 1rem; |
108 | 85 | margin-top: 1rem; |
109 | 86 | } |
110 | 87 |
|
111 | | -.cite-format-tab { |
112 | | - margin-right: 0.25rem; |
113 | | - margin-bottom: 0.5rem; |
114 | | - cursor: pointer; |
115 | | - display: inline-block; |
116 | | - font-size: 0.78rem; |
117 | | - font-weight: 600; |
118 | | - background-color: #f0f0f0; |
119 | | - border: 1px solid #d2d2d2; |
120 | | - border-radius: 9999px; |
121 | | - padding: 0.3rem 0.9rem; |
122 | | - text-decoration: none; |
123 | | - transition: background-color 0.15s ease, border-color 0.15s ease; |
124 | | - |
125 | | - &:hover { |
126 | | - border-color: var(--color-link); |
127 | | - color: var(--color-link); |
128 | | - } |
| 88 | +.cite-panel { |
| 89 | + display: grid; |
| 90 | + gap: 0.5rem; |
129 | 91 | } |
130 | 92 |
|
131 | | -.cite-panel { |
132 | | - display: none; |
| 93 | +.cite-panel__heading { |
| 94 | + margin: 0; |
| 95 | + color: var(--color-text); |
| 96 | + font-size: 0.78rem; |
| 97 | + font-weight: 700; |
| 98 | + line-height: 1.3; |
133 | 99 | } |
134 | 100 |
|
135 | 101 | .cite-copy-controls { |
136 | 102 | display: none; |
137 | 103 | align-items: center; |
138 | 104 | gap: 0.5rem; |
139 | 105 | flex-wrap: wrap; |
140 | | - margin-top: 0.5rem; |
141 | 106 | } |
142 | 107 |
|
143 | 108 | .citation.cite-copy-enabled .cite-copy-controls { |
144 | 109 | display: flex; |
145 | 110 | } |
146 | 111 |
|
| 112 | +.cite-copy-btn { |
| 113 | + font-size: 0.78rem; |
| 114 | + cursor: pointer; |
| 115 | +} |
| 116 | + |
147 | 117 | .cite-copy-status { |
148 | 118 | color: var(--color-text-light); |
149 | 119 | font-size: 0.78rem; |
150 | 120 | min-height: 1em; |
151 | 121 | } |
152 | 122 |
|
153 | | -[id$="-apa"]:checked { |
154 | | - ~ [for$="-apa"].cite-format-tab { |
155 | | - border-color: var(--color-link); |
156 | | - color: var(--color-link); |
157 | | - background-color: rgba(0, 152, 212, 0.08); |
158 | | - } |
159 | | - |
160 | | - ~ .cite-formats .cite-panel--apa, |
161 | | - ~ .cite-panel--apa { |
162 | | - display: block; |
163 | | - } |
164 | | -} |
165 | | - |
166 | | -[id$="-mla"]:checked { |
167 | | - ~ [for$="-mla"].cite-format-tab { |
168 | | - border-color: var(--color-link); |
169 | | - color: var(--color-link); |
170 | | - background-color: rgba(0, 152, 212, 0.08); |
171 | | - } |
172 | | - |
173 | | - ~ .cite-formats .cite-panel--mla, |
174 | | - ~ .cite-panel--mla { |
175 | | - display: block; |
176 | | - } |
177 | | -} |
178 | | - |
179 | | -[id$="-chicago"]:checked { |
180 | | - ~ [for$="-chicago"].cite-format-tab { |
181 | | - border-color: var(--color-link); |
182 | | - color: var(--color-link); |
183 | | - background-color: rgba(0, 152, 212, 0.08); |
184 | | - } |
185 | | - |
186 | | - ~ .cite-formats .cite-panel--chicago, |
187 | | - ~ .cite-panel--chicago { |
188 | | - display: block; |
189 | | - } |
190 | | -} |
191 | | - |
192 | | -[id$="-harvard"]:checked { |
193 | | - ~ [for$="-harvard"].cite-format-tab { |
194 | | - border-color: var(--color-link); |
195 | | - color: var(--color-link); |
196 | | - background-color: rgba(0, 152, 212, 0.08); |
197 | | - } |
198 | | - |
199 | | - ~ .cite-formats .cite-panel--harvard, |
200 | | - ~ .cite-panel--harvard { |
201 | | - display: block; |
202 | | - } |
203 | | -} |
204 | | - |
205 | | -[id$="-bibtex"]:checked { |
206 | | - ~ [for$="-bibtex"].cite-format-tab { |
207 | | - border-color: var(--color-link); |
208 | | - color: var(--color-link); |
209 | | - background-color: rgba(0, 152, 212, 0.08); |
210 | | - } |
211 | | - |
212 | | - ~ .cite-formats .cite-panel--bibtex, |
213 | | - ~ .cite-panel--bibtex { |
214 | | - display: block; |
215 | | - } |
216 | | -} |
217 | | - |
218 | | -// text |
219 | | - |
220 | 123 | .cite-text { |
221 | 124 | font-family: monospace; |
222 | 125 | font-size: 0.82rem; |
|
227 | 130 | border-radius: 4px; |
228 | 131 | background: #f9f9f9; |
229 | 132 | white-space: pre-wrap; |
230 | | - word-break: break-all; |
| 133 | + word-break: break-word; |
231 | 134 | color: var(--color-text); |
232 | 135 | } |
0 commit comments