pdf_viewer.css 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581
  1. /* Copyright 2014 Mozilla Foundation
  2. *
  3. * Licensed under the Apache License, Version 2.0 (the "License");
  4. * you may not use this file except in compliance with the License.
  5. * You may obtain a copy of the License at
  6. *
  7. * http://www.apache.org/licenses/LICENSE-2.0
  8. *
  9. * Unless required by applicable law or agreed to in writing, software
  10. * distributed under the License is distributed on an "AS IS" BASIS,
  11. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. * See the License for the specific language governing permissions and
  13. * limitations under the License.
  14. */
  15. .textLayer {
  16. position: absolute;
  17. left: 0;
  18. top: 0;
  19. right: 0;
  20. bottom: 0;
  21. overflow: hidden;
  22. opacity: 0.2;
  23. line-height: 1;
  24. }
  25. .textLayer > span {
  26. color: transparent;
  27. position: absolute;
  28. white-space: pre;
  29. cursor: text;
  30. transform-origin: 0% 0%;
  31. }
  32. .textLayer .highlight {
  33. margin: -1px;
  34. padding: 1px;
  35. background-color: rgba(180, 0, 170, 1);
  36. border-radius: 4px;
  37. }
  38. .textLayer .highlight.begin {
  39. border-radius: 4px 0 0 4px;
  40. }
  41. .textLayer .highlight.end {
  42. border-radius: 0 4px 4px 0;
  43. }
  44. .textLayer .highlight.middle {
  45. border-radius: 0;
  46. }
  47. .textLayer .highlight.selected {
  48. background-color: rgba(0, 100, 0, 1);
  49. }
  50. .textLayer ::-moz-selection {
  51. background: rgba(0, 0, 255, 1);
  52. }
  53. .textLayer ::selection {
  54. background: rgba(0, 0, 255, 1);
  55. }
  56. .textLayer .endOfContent {
  57. display: block;
  58. position: absolute;
  59. left: 0;
  60. top: 100%;
  61. right: 0;
  62. bottom: 0;
  63. z-index: -1;
  64. cursor: default;
  65. -webkit-user-select: none;
  66. -moz-user-select: none;
  67. user-select: none;
  68. }
  69. .textLayer .endOfContent.active {
  70. top: 0;
  71. }
  72. .annotationLayer section {
  73. position: absolute;
  74. text-align: initial;
  75. }
  76. .annotationLayer .linkAnnotation > a,
  77. .annotationLayer .buttonWidgetAnnotation.pushButton > a {
  78. position: absolute;
  79. font-size: 1em;
  80. top: 0;
  81. left: 0;
  82. width: 100%;
  83. height: 100%;
  84. }
  85. .annotationLayer .linkAnnotation > a:hover,
  86. .annotationLayer .buttonWidgetAnnotation.pushButton > a:hover {
  87. opacity: 0.2;
  88. background: rgba(255, 255, 0, 1);
  89. box-shadow: 0 2px 10px rgba(255, 255, 0, 1);
  90. }
  91. .annotationLayer .textAnnotation img {
  92. position: absolute;
  93. cursor: pointer;
  94. }
  95. .annotationLayer .textWidgetAnnotation input,
  96. .annotationLayer .textWidgetAnnotation textarea,
  97. .annotationLayer .choiceWidgetAnnotation select,
  98. .annotationLayer .buttonWidgetAnnotation.checkBox input,
  99. .annotationLayer .buttonWidgetAnnotation.radioButton input {
  100. background-color: rgba(0, 54, 255, 0.13);
  101. border: 1px solid transparent;
  102. box-sizing: border-box;
  103. font-size: 9px;
  104. height: 100%;
  105. margin: 0;
  106. padding: 0 3px;
  107. vertical-align: top;
  108. width: 100%;
  109. }
  110. .annotationLayer .choiceWidgetAnnotation select option {
  111. padding: 0;
  112. }
  113. .annotationLayer .buttonWidgetAnnotation.radioButton input {
  114. border-radius: 50%;
  115. }
  116. .annotationLayer .textWidgetAnnotation textarea {
  117. font: message-box;
  118. font-size: 9px;
  119. resize: none;
  120. }
  121. .annotationLayer .textWidgetAnnotation input[disabled],
  122. .annotationLayer .textWidgetAnnotation textarea[disabled],
  123. .annotationLayer .choiceWidgetAnnotation select[disabled],
  124. .annotationLayer .buttonWidgetAnnotation.checkBox input[disabled],
  125. .annotationLayer .buttonWidgetAnnotation.radioButton input[disabled] {
  126. background: none;
  127. border: 1px solid transparent;
  128. cursor: not-allowed;
  129. }
  130. .annotationLayer .textWidgetAnnotation input:hover,
  131. .annotationLayer .textWidgetAnnotation textarea:hover,
  132. .annotationLayer .choiceWidgetAnnotation select:hover,
  133. .annotationLayer .buttonWidgetAnnotation.checkBox input:hover,
  134. .annotationLayer .buttonWidgetAnnotation.radioButton input:hover {
  135. border: 1px solid rgba(0, 0, 0, 1);
  136. }
  137. .annotationLayer .textWidgetAnnotation input:focus,
  138. .annotationLayer .textWidgetAnnotation textarea:focus,
  139. .annotationLayer .choiceWidgetAnnotation select:focus {
  140. background: none;
  141. border: 1px solid transparent;
  142. }
  143. .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,
  144. .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after,
  145. .annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before {
  146. background-color: rgba(0, 0, 0, 1);
  147. content: "";
  148. display: block;
  149. position: absolute;
  150. }
  151. .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,
  152. .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after {
  153. height: 80%;
  154. left: 45%;
  155. width: 1px;
  156. }
  157. .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before {
  158. transform: rotate(45deg);
  159. }
  160. .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after {
  161. transform: rotate(-45deg);
  162. }
  163. .annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before {
  164. border-radius: 50%;
  165. height: 50%;
  166. left: 30%;
  167. top: 20%;
  168. width: 50%;
  169. }
  170. .annotationLayer .textWidgetAnnotation input.comb {
  171. font-family: monospace;
  172. padding-left: 2px;
  173. padding-right: 0;
  174. }
  175. .annotationLayer .textWidgetAnnotation input.comb:focus {
  176. /*
  177. * Letter spacing is placed on the right side of each character. Hence, the
  178. * letter spacing of the last character may be placed outside the visible
  179. * area, causing horizontal scrolling. We avoid this by extending the width
  180. * when the element has focus and revert this when it loses focus.
  181. */
  182. width: 115%;
  183. }
  184. .annotationLayer .buttonWidgetAnnotation.checkBox input,
  185. .annotationLayer .buttonWidgetAnnotation.radioButton input {
  186. -webkit-appearance: none;
  187. -moz-appearance: none;
  188. appearance: none;
  189. padding: 0;
  190. }
  191. .annotationLayer .popupWrapper {
  192. position: absolute;
  193. width: 20em;
  194. }
  195. .annotationLayer .popup {
  196. position: absolute;
  197. z-index: 200;
  198. max-width: 20em;
  199. background-color: rgba(255, 255, 153, 1);
  200. box-shadow: 0 2px 5px rgba(136, 136, 136, 1);
  201. border-radius: 2px;
  202. padding: 6px;
  203. margin-left: 5px;
  204. cursor: pointer;
  205. font: message-box;
  206. font-size: 9px;
  207. white-space: normal;
  208. word-wrap: break-word;
  209. }
  210. .annotationLayer .popup > * {
  211. font-size: 9px;
  212. }
  213. .annotationLayer .popup h1 {
  214. display: inline-block;
  215. }
  216. .annotationLayer .popup span {
  217. display: inline-block;
  218. margin-left: 5px;
  219. }
  220. .annotationLayer .popup p {
  221. border-top: 1px solid rgba(51, 51, 51, 1);
  222. margin-top: 2px;
  223. padding-top: 2px;
  224. }
  225. .annotationLayer .highlightAnnotation,
  226. .annotationLayer .underlineAnnotation,
  227. .annotationLayer .squigglyAnnotation,
  228. .annotationLayer .strikeoutAnnotation,
  229. .annotationLayer .freeTextAnnotation,
  230. .annotationLayer .lineAnnotation svg line,
  231. .annotationLayer .squareAnnotation svg rect,
  232. .annotationLayer .circleAnnotation svg ellipse,
  233. .annotationLayer .polylineAnnotation svg polyline,
  234. .annotationLayer .polygonAnnotation svg polygon,
  235. .annotationLayer .caretAnnotation,
  236. .annotationLayer .inkAnnotation svg polyline,
  237. .annotationLayer .stampAnnotation,
  238. .annotationLayer .fileAttachmentAnnotation {
  239. cursor: pointer;
  240. }
  241. */* Copyright 2021 Mozilla Foundation
  242. *
  243. * Licensed under the Apache License, Version 2.0 (the "License");
  244. * you may not use this file except in compliance with the License.
  245. * You may obtain a copy of the License at
  246. *
  247. * http://www.apache.org/licenses/LICENSE-2.0
  248. *
  249. * Unless required by applicable law or agreed to in writing, software
  250. * distributed under the License is distributed on an "AS IS" BASIS,
  251. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  252. * See the License for the specific language governing permissions and
  253. * limitations under the License.
  254. */
  255. .xfaLayer {
  256. position: absolute;
  257. top: 0;
  258. left: 0;
  259. z-index: 200;
  260. transform-origin: 0 0;
  261. }
  262. .xfaLayer * {
  263. color: inherit;
  264. font: inherit;
  265. -webkit-font-kerning: inherit;
  266. font-kerning: inherit;
  267. letter-spacing: inherit;
  268. text-align: inherit;
  269. text-decoration: inherit;
  270. vertical-align: inherit;
  271. box-sizing: border-box;
  272. }
  273. .xfaFont {
  274. color: black;
  275. font-weight: normal;
  276. -webkit-font-kerning: none;
  277. font-kerning: none;
  278. font-size: 10px;
  279. font-style: normal;
  280. letter-spacing: 0;
  281. text-decoration: none;
  282. vertical-align: 0;
  283. }
  284. .xfaDraw {
  285. z-index: 200;
  286. }
  287. .xfaExclgroup {
  288. z-index: 300;
  289. }
  290. .xfaField {
  291. z-index: 300;
  292. }
  293. .xfaSubform {
  294. z-index: 100;
  295. }
  296. .xfaLabel {
  297. display: flex;
  298. flex-direction: row;
  299. align-items: center;
  300. width: 100%;
  301. height: 100%;
  302. }
  303. .xfaCaption {
  304. flex: 1 1 auto;
  305. }
  306. .xfaTextfield,
  307. .xfaSelect {
  308. width: 100%;
  309. height: 100%;
  310. flex: 1 1 auto;
  311. border: none;
  312. }
  313. .xfaLabel > input[type="checkbox"] {
  314. /* Use this trick to make the checkbox invisible but
  315. but still focusable. */
  316. position: absolute;
  317. left: -99999px;
  318. }
  319. .xfaLabel > input[type="checkbox"]:focus + .xfaCheckboxMark {
  320. box-shadow: 0 0 5px rgba(0, 0, 0, 0.7);
  321. }
  322. .xfaCheckboxMark {
  323. cursor: pointer;
  324. flex: 0 0 auto;
  325. border-style: solid;
  326. border-width: 2px;
  327. border-color: #8f8f9d;
  328. font-size: 10px;
  329. line-height: 10px;
  330. width: 10px;
  331. height: 10px;
  332. text-align: center;
  333. vertical-align: middle;
  334. display: flex;
  335. flex-direction: row;
  336. align-items: center;
  337. }
  338. .xfaCheckbox:checked + .xfaCheckboxMark::after {
  339. content: attr(mark);
  340. }
  341. .xfaButton {
  342. cursor: pointer;
  343. width: 100%;
  344. height: 100%;
  345. border: none;
  346. text-align: center;
  347. }
  348. .xfaButton:hover {
  349. background: Highlight;
  350. }
  351. .xfaLrTb,
  352. .xfaRlTb,
  353. .xfaTb,
  354. .xfaPosition {
  355. display: block;
  356. }
  357. .xfaPosition {
  358. position: relative;
  359. }
  360. .xfaValignMiddle {
  361. display: flex;
  362. align-items: center;
  363. }
  364. .xfaLrTb > div {
  365. display: inline;
  366. float: left;
  367. }
  368. .xfaRlTb > div {
  369. display: inline;
  370. float: right;
  371. }
  372. .xfaTable {
  373. display: flex;
  374. flex-direction: column;
  375. }
  376. .xfaTable .xfaRow {
  377. display: flex;
  378. flex-direction: row;
  379. flex: 1 1 auto;
  380. }
  381. .xfaTable .xfaRow > div {
  382. flex: 1 1 auto;
  383. }
  384. .xfaTable .xfaRlRow {
  385. display: flex;
  386. flex-direction: row-reverse;
  387. flex: 1;
  388. }
  389. .xfaTable .xfaRlRow > div {
  390. flex: 1;
  391. }
  392. .pdfViewer .canvasWrapper {
  393. overflow: hidden;
  394. }
  395. .pdfViewer .page {
  396. direction: ltr;
  397. width: 816px;
  398. height: 1056px;
  399. margin: 1px auto -8px;
  400. position: relative;
  401. overflow: visible;
  402. border: 9px solid transparent;
  403. background-clip: content-box;
  404. -o-border-image: url(images/shadow.png) 9 9 repeat;
  405. border-image: url(images/shadow.png) 9 9 repeat;
  406. background-color: rgba(255, 255, 255, 1);
  407. }
  408. .pdfViewer.removePageBorders .page {
  409. margin: 0 auto 10px;
  410. border: none;
  411. }
  412. .pdfViewer.singlePageView {
  413. display: inline-block;
  414. }
  415. .pdfViewer.singlePageView .page {
  416. margin: 0;
  417. border: none;
  418. }
  419. .pdfViewer.scrollHorizontal,
  420. .pdfViewer.scrollWrapped,
  421. .spread {
  422. margin-left: 3.5px;
  423. margin-right: 3.5px;
  424. text-align: center;
  425. }
  426. .pdfViewer.scrollHorizontal,
  427. .spread {
  428. white-space: nowrap;
  429. }
  430. .pdfViewer.removePageBorders,
  431. .pdfViewer.scrollHorizontal .spread,
  432. .pdfViewer.scrollWrapped .spread {
  433. margin-left: 0;
  434. margin-right: 0;
  435. }
  436. .spread .page,
  437. .pdfViewer.scrollHorizontal .page,
  438. .pdfViewer.scrollWrapped .page,
  439. .pdfViewer.scrollHorizontal .spread,
  440. .pdfViewer.scrollWrapped .spread {
  441. display: inline-block;
  442. vertical-align: middle;
  443. }
  444. .spread .page,
  445. .pdfViewer.scrollHorizontal .page,
  446. .pdfViewer.scrollWrapped .page {
  447. margin-left: -3.5px;
  448. margin-right: -3.5px;
  449. }
  450. .pdfViewer.removePageBorders .spread .page,
  451. .pdfViewer.removePageBorders.scrollHorizontal .page,
  452. .pdfViewer.removePageBorders.scrollWrapped .page {
  453. margin-left: 5px;
  454. margin-right: 5px;
  455. }
  456. .pdfViewer .page canvas {
  457. margin: 0;
  458. display: block;
  459. }
  460. .pdfViewer .page canvas[hidden] {
  461. display: none;
  462. }
  463. .pdfViewer .page .loadingIcon {
  464. position: absolute;
  465. display: block;
  466. left: 0;
  467. top: 0;
  468. right: 0;
  469. bottom: 0;
  470. background: url("images/loading-icon.gif") center no-repeat;
  471. }
  472. .pdfPresentationMode .pdfViewer {
  473. margin-left: 0;
  474. margin-right: 0;
  475. }
  476. .pdfPresentationMode .pdfViewer .page,
  477. .pdfPresentationMode .pdfViewer .spread {
  478. display: block;
  479. }
  480. .pdfPresentationMode .pdfViewer .page,
  481. .pdfPresentationMode .pdfViewer.removePageBorders .page {
  482. margin-left: auto;
  483. margin-right: auto;
  484. }
  485. .pdfPresentationMode:-webkit-full-screen .pdfViewer .page {
  486. margin-bottom: 100%;
  487. border: 0;
  488. }
  489. .pdfPresentationMode:-moz-full-screen .pdfViewer .page {
  490. margin-bottom: 100%;
  491. border: 0;
  492. }
  493. .pdfPresentationMode:fullscreen .pdfViewer .page {
  494. margin-bottom: 100%;
  495. border: 0;
  496. }