pdf_viewer.css 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681
  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. text-align: initial;
  18. left: 0;
  19. top: 0;
  20. right: 0;
  21. bottom: 0;
  22. overflow: hidden;
  23. opacity: 0.2;
  24. line-height: 1;
  25. }
  26. .textLayer span,
  27. .textLayer br {
  28. color: transparent;
  29. position: absolute;
  30. white-space: pre;
  31. cursor: text;
  32. transform-origin: 0% 0%;
  33. }
  34. .textLayer .highlight {
  35. margin: -1px;
  36. padding: 1px;
  37. background-color: rgba(180, 0, 170, 1);
  38. border-radius: 4px;
  39. }
  40. .textLayer .highlight.appended {
  41. position: initial;
  42. }
  43. .textLayer .highlight.begin {
  44. border-radius: 4px 0 0 4px;
  45. }
  46. .textLayer .highlight.end {
  47. border-radius: 0 4px 4px 0;
  48. }
  49. .textLayer .highlight.middle {
  50. border-radius: 0;
  51. }
  52. .textLayer .highlight.selected {
  53. background-color: rgba(0, 100, 0, 1);
  54. }
  55. .textLayer ::-moz-selection {
  56. background: rgba(0, 0, 255, 1);
  57. }
  58. .textLayer ::selection {
  59. background: rgba(0, 0, 255, 1);
  60. }
  61. .textLayer .endOfContent {
  62. display: block;
  63. position: absolute;
  64. left: 0;
  65. top: 100%;
  66. right: 0;
  67. bottom: 0;
  68. z-index: -1;
  69. cursor: default;
  70. -webkit-user-select: none;
  71. -moz-user-select: none;
  72. user-select: none;
  73. }
  74. .textLayer .endOfContent.active {
  75. top: 0;
  76. }
  77. .annotationLayer section {
  78. position: absolute;
  79. text-align: initial;
  80. }
  81. .annotationLayer .linkAnnotation > a,
  82. .annotationLayer .buttonWidgetAnnotation.pushButton > a {
  83. position: absolute;
  84. font-size: 1em;
  85. top: 0;
  86. left: 0;
  87. width: 100%;
  88. height: 100%;
  89. }
  90. .annotationLayer .linkAnnotation > a:hover,
  91. .annotationLayer .buttonWidgetAnnotation.pushButton > a:hover {
  92. opacity: 0.2;
  93. background: rgba(255, 255, 0, 1);
  94. box-shadow: 0 2px 10px rgba(255, 255, 0, 1);
  95. }
  96. .annotationLayer .textAnnotation img {
  97. position: absolute;
  98. cursor: pointer;
  99. }
  100. .annotationLayer .textWidgetAnnotation input,
  101. .annotationLayer .textWidgetAnnotation textarea,
  102. .annotationLayer .choiceWidgetAnnotation select,
  103. .annotationLayer .buttonWidgetAnnotation.checkBox input,
  104. .annotationLayer .buttonWidgetAnnotation.radioButton input {
  105. background-color: rgba(0, 54, 255, 0.13);
  106. border: 1px solid transparent;
  107. box-sizing: border-box;
  108. font-size: 9px;
  109. height: 100%;
  110. margin: 0;
  111. padding: 0 3px;
  112. vertical-align: top;
  113. width: 100%;
  114. }
  115. .annotationLayer .choiceWidgetAnnotation select option {
  116. padding: 0;
  117. }
  118. .annotationLayer .buttonWidgetAnnotation.radioButton input {
  119. border-radius: 50%;
  120. }
  121. .annotationLayer .textWidgetAnnotation textarea {
  122. font: message-box;
  123. font-size: 9px;
  124. resize: none;
  125. }
  126. .annotationLayer .textWidgetAnnotation input[disabled],
  127. .annotationLayer .textWidgetAnnotation textarea[disabled],
  128. .annotationLayer .choiceWidgetAnnotation select[disabled],
  129. .annotationLayer .buttonWidgetAnnotation.checkBox input[disabled],
  130. .annotationLayer .buttonWidgetAnnotation.radioButton input[disabled] {
  131. background: none;
  132. border: 1px solid transparent;
  133. cursor: not-allowed;
  134. }
  135. .annotationLayer .textWidgetAnnotation input:hover,
  136. .annotationLayer .textWidgetAnnotation textarea:hover,
  137. .annotationLayer .choiceWidgetAnnotation select:hover,
  138. .annotationLayer .buttonWidgetAnnotation.checkBox input:hover,
  139. .annotationLayer .buttonWidgetAnnotation.radioButton input:hover {
  140. border: 1px solid rgba(0, 0, 0, 1);
  141. }
  142. .annotationLayer .textWidgetAnnotation input:focus,
  143. .annotationLayer .textWidgetAnnotation textarea:focus,
  144. .annotationLayer .choiceWidgetAnnotation select:focus {
  145. background: none;
  146. border: 1px solid transparent;
  147. }
  148. .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,
  149. .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after,
  150. .annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before {
  151. background-color: rgba(0, 0, 0, 1);
  152. content: "";
  153. display: block;
  154. position: absolute;
  155. }
  156. .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,
  157. .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after {
  158. height: 80%;
  159. left: 45%;
  160. width: 1px;
  161. }
  162. .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before {
  163. transform: rotate(45deg);
  164. }
  165. .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after {
  166. transform: rotate(-45deg);
  167. }
  168. .annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before {
  169. border-radius: 50%;
  170. height: 50%;
  171. left: 30%;
  172. top: 20%;
  173. width: 50%;
  174. }
  175. .annotationLayer .textWidgetAnnotation input.comb {
  176. font-family: monospace;
  177. padding-left: 2px;
  178. padding-right: 0;
  179. }
  180. .annotationLayer .textWidgetAnnotation input.comb:focus {
  181. /*
  182. * Letter spacing is placed on the right side of each character. Hence, the
  183. * letter spacing of the last character may be placed outside the visible
  184. * area, causing horizontal scrolling. We avoid this by extending the width
  185. * when the element has focus and revert this when it loses focus.
  186. */
  187. width: 103%;
  188. }
  189. .annotationLayer .buttonWidgetAnnotation.checkBox input,
  190. .annotationLayer .buttonWidgetAnnotation.radioButton input {
  191. -webkit-appearance: none;
  192. -moz-appearance: none;
  193. appearance: none;
  194. padding: 0;
  195. }
  196. .annotationLayer .popupWrapper {
  197. position: absolute;
  198. width: 20em;
  199. }
  200. .annotationLayer .popup {
  201. position: absolute;
  202. z-index: 200;
  203. max-width: 20em;
  204. background-color: rgba(255, 255, 153, 1);
  205. box-shadow: 0 2px 5px rgba(136, 136, 136, 1);
  206. border-radius: 2px;
  207. padding: 6px;
  208. margin-left: 5px;
  209. cursor: pointer;
  210. font: message-box;
  211. font-size: 9px;
  212. white-space: normal;
  213. word-wrap: break-word;
  214. }
  215. .annotationLayer .popup > * {
  216. font-size: 9px;
  217. }
  218. .annotationLayer .popup h1 {
  219. display: inline-block;
  220. }
  221. .annotationLayer .popup span {
  222. display: inline-block;
  223. margin-left: 5px;
  224. }
  225. .annotationLayer .popup p {
  226. border-top: 1px solid rgba(51, 51, 51, 1);
  227. margin-top: 2px;
  228. padding-top: 2px;
  229. }
  230. .annotationLayer .highlightAnnotation,
  231. .annotationLayer .underlineAnnotation,
  232. .annotationLayer .squigglyAnnotation,
  233. .annotationLayer .strikeoutAnnotation,
  234. .annotationLayer .freeTextAnnotation,
  235. .annotationLayer .lineAnnotation svg line,
  236. .annotationLayer .squareAnnotation svg rect,
  237. .annotationLayer .circleAnnotation svg ellipse,
  238. .annotationLayer .polylineAnnotation svg polyline,
  239. .annotationLayer .polygonAnnotation svg polygon,
  240. .annotationLayer .caretAnnotation,
  241. .annotationLayer .inkAnnotation svg polyline,
  242. .annotationLayer .stampAnnotation,
  243. .annotationLayer .fileAttachmentAnnotation {
  244. cursor: pointer;
  245. }
  246. .xfaPage {
  247. overflow: hidden;
  248. position: relative;
  249. }
  250. .xfaContentarea {
  251. position: absolute;
  252. }
  253. .xfaPrintOnly {
  254. display: none;
  255. }
  256. .xfaLayer {
  257. position: absolute;
  258. text-align: initial;
  259. top: 0;
  260. left: 0;
  261. transform-origin: 0 0;
  262. line-height: 1.2;
  263. }
  264. .xfaLayer * {
  265. color: inherit;
  266. font: inherit;
  267. font-style: inherit;
  268. font-weight: inherit;
  269. font-kerning: inherit;
  270. letter-spacing: -0.01px;
  271. text-align: inherit;
  272. text-decoration: inherit;
  273. box-sizing: border-box;
  274. background: transparent;
  275. padding: 0;
  276. margin: 0;
  277. pointer-events: auto;
  278. }
  279. .xfaLayer div {
  280. pointer-events: none;
  281. }
  282. .xfaLayer svg {
  283. pointer-events: none;
  284. }
  285. .xfaLayer svg * {
  286. pointer-events: none;
  287. }
  288. .xfaLayer a {
  289. color: blue;
  290. }
  291. .xfaRich li {
  292. margin-left: 3em;
  293. }
  294. .xfaFont {
  295. color: black;
  296. font-weight: normal;
  297. font-kerning: none;
  298. font-size: 10px;
  299. font-style: normal;
  300. letter-spacing: 0;
  301. text-decoration: none;
  302. vertical-align: 0;
  303. }
  304. .xfaCaption {
  305. overflow: hidden;
  306. flex: 0 1 auto;
  307. }
  308. .xfaCaptionForCheckButton {
  309. overflow: hidden;
  310. flex: 1 1 auto;
  311. }
  312. .xfaLabel {
  313. height: 100%;
  314. width: 100%;
  315. }
  316. .xfaLeft {
  317. display: flex;
  318. flex-direction: row;
  319. align-items: center;
  320. }
  321. .xfaLeft > .xfaCaption,
  322. .xfaLeft > .xfaCaptionForCheckButton {
  323. max-height: 100%;
  324. }
  325. .xfaTop {
  326. display: flex;
  327. flex-direction: column;
  328. align-items: flex-start;
  329. }
  330. .xfaTop > .xfaCaption,
  331. .xfaTop > .xfaCaptionForCheckButton {
  332. width: 100%;
  333. }
  334. .xfaBorder {
  335. background: transparent;
  336. position: absolute;
  337. pointer-events: none;
  338. }
  339. .xfaWrapped {
  340. width: 100%;
  341. height: 100%;
  342. }
  343. .xfaTextfield,
  344. .xfaSelect {
  345. background-color: rgba(0, 54, 255, 0.13);
  346. }
  347. .xfaTextfield:focus,
  348. .xfaSelect:focus {
  349. background-color: transparent;
  350. outline: none;
  351. }
  352. .xfaTextfield,
  353. .xfaSelect {
  354. width: 100%;
  355. height: 100%;
  356. flex: 1 1 0;
  357. border: none;
  358. resize: none;
  359. }
  360. .xfaButton {
  361. cursor: pointer;
  362. width: 100%;
  363. height: 100%;
  364. border: none;
  365. text-align: center;
  366. }
  367. .xfaButton:hover {
  368. background: Highlight;
  369. }
  370. .xfaCheckbox,
  371. .xfaRadio {
  372. width: 100%;
  373. height: 100%;
  374. flex: 0 0 auto;
  375. border: none;
  376. }
  377. .xfaRich {
  378. white-space: pre-wrap;
  379. width: 100%;
  380. height: 100%;
  381. }
  382. .xfaImage {
  383. -o-object-position: left top;
  384. object-position: left top;
  385. -o-object-fit: contain;
  386. object-fit: contain;
  387. width: 100%;
  388. height: 100%;
  389. }
  390. .xfaLrTb,
  391. .xfaRlTb,
  392. .xfaTb {
  393. display: flex;
  394. flex-direction: column;
  395. align-items: stretch;
  396. }
  397. .xfaLr {
  398. display: flex;
  399. flex-direction: row;
  400. align-items: stretch;
  401. }
  402. .xfaRl {
  403. display: flex;
  404. flex-direction: row-reverse;
  405. align-items: stretch;
  406. }
  407. .xfaTb > div {
  408. justify-content: left;
  409. }
  410. .xfaPosition {
  411. position: relative;
  412. }
  413. .xfaArea {
  414. position: relative;
  415. }
  416. .xfaValignMiddle {
  417. display: flex;
  418. align-items: center;
  419. }
  420. .xfaTable {
  421. display: flex;
  422. flex-direction: column;
  423. align-items: stretch;
  424. }
  425. .xfaTable .xfaRow {
  426. display: flex;
  427. flex-direction: row;
  428. align-items: stretch;
  429. }
  430. .xfaTable .xfaRlRow {
  431. display: flex;
  432. flex-direction: row-reverse;
  433. align-items: stretch;
  434. flex: 1;
  435. }
  436. .xfaTable .xfaRlRow > div {
  437. flex: 1;
  438. }
  439. .xfaNonInteractive input,
  440. .xfaNonInteractive textarea,
  441. .xfaDisabled input,
  442. .xfaDisabled textarea,
  443. .xfaReadOnly input,
  444. .xfaReadOnly textarea {
  445. background: initial;
  446. }
  447. @media print {
  448. .xfaTextfield,
  449. .xfaSelect {
  450. background-color: transparent;
  451. }
  452. .xfaSelect {
  453. -webkit-appearance: none;
  454. -moz-appearance: none;
  455. appearance: none;
  456. text-indent: 1px;
  457. text-overflow: "";
  458. }
  459. }
  460. :root {
  461. --pdfViewer-padding-bottom: none;
  462. --page-margin: 1px auto -8px;
  463. --page-border: 9px solid transparent;
  464. --spreadHorizontalWrapped-margin-LR: -3.5px;
  465. }
  466. @media screen and (forced-colors: active) {
  467. :root {
  468. --pdfViewer-padding-bottom: 9px;
  469. --page-margin: 9px auto 0;
  470. --page-border: none;
  471. --spreadHorizontalWrapped-margin-LR: 4.5px;
  472. }
  473. }
  474. .pdfViewer {
  475. padding-bottom: var(--pdfViewer-padding-bottom);
  476. }
  477. .pdfViewer .canvasWrapper {
  478. overflow: hidden;
  479. }
  480. .pdfViewer .page {
  481. direction: ltr;
  482. width: 816px;
  483. height: 1056px;
  484. margin: var(--page-margin);
  485. position: relative;
  486. overflow: visible;
  487. border: var(--page-border);
  488. background-clip: content-box;
  489. -o-border-image: url(images/shadow.png) 9 9 repeat;
  490. border-image: url(images/shadow.png) 9 9 repeat;
  491. background-color: rgba(255, 255, 255, 1);
  492. }
  493. .pdfViewer.removePageBorders .page {
  494. margin: 0 auto 10px;
  495. border: none;
  496. }
  497. .pdfViewer.singlePageView {
  498. display: inline-block;
  499. }
  500. .pdfViewer.singlePageView .page {
  501. margin: 0;
  502. border: none;
  503. }
  504. .pdfViewer.scrollHorizontal,
  505. .pdfViewer.scrollWrapped,
  506. .spread {
  507. margin-left: 3.5px;
  508. margin-right: 3.5px;
  509. text-align: center;
  510. }
  511. .pdfViewer.scrollHorizontal,
  512. .spread {
  513. white-space: nowrap;
  514. }
  515. .pdfViewer.removePageBorders,
  516. .pdfViewer.scrollHorizontal .spread,
  517. .pdfViewer.scrollWrapped .spread {
  518. margin-left: 0;
  519. margin-right: 0;
  520. }
  521. .spread .page,
  522. .pdfViewer.scrollHorizontal .page,
  523. .pdfViewer.scrollWrapped .page,
  524. .pdfViewer.scrollHorizontal .spread,
  525. .pdfViewer.scrollWrapped .spread {
  526. display: inline-block;
  527. vertical-align: middle;
  528. }
  529. .spread .page,
  530. .pdfViewer.scrollHorizontal .page,
  531. .pdfViewer.scrollWrapped .page {
  532. margin-left: var(--spreadHorizontalWrapped-margin-LR);
  533. margin-right: var(--spreadHorizontalWrapped-margin-LR);
  534. }
  535. .pdfViewer.removePageBorders .spread .page,
  536. .pdfViewer.removePageBorders.scrollHorizontal .page,
  537. .pdfViewer.removePageBorders.scrollWrapped .page {
  538. margin-left: 5px;
  539. margin-right: 5px;
  540. }
  541. .pdfViewer .page canvas {
  542. margin: 0;
  543. display: block;
  544. }
  545. .pdfViewer .page canvas[hidden] {
  546. display: none;
  547. }
  548. .pdfViewer .page .loadingIcon {
  549. position: absolute;
  550. display: block;
  551. left: 0;
  552. top: 0;
  553. right: 0;
  554. bottom: 0;
  555. background: url("images/loading-icon.gif") center no-repeat;
  556. }
  557. .pdfPresentationMode .pdfViewer {
  558. margin-left: 0;
  559. margin-right: 0;
  560. }
  561. .pdfPresentationMode .pdfViewer .page,
  562. .pdfPresentationMode .pdfViewer .spread {
  563. display: block;
  564. }
  565. .pdfPresentationMode .pdfViewer .page,
  566. .pdfPresentationMode .pdfViewer.removePageBorders .page {
  567. margin-left: auto;
  568. margin-right: auto;
  569. }
  570. .pdfPresentationMode:-webkit-full-screen .pdfViewer .page {
  571. margin-bottom: 100%;
  572. border: 0;
  573. }
  574. .pdfPresentationMode:fullscreen .pdfViewer .page {
  575. margin-bottom: 100%;
  576. border: 0;
  577. }