pdf_viewer.css 13 KB

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