pdf_viewer.css 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  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.0;
  24. }
  25. .textLayer > div {
  26. color: transparent;
  27. position: absolute;
  28. white-space: pre;
  29. cursor: text;
  30. -webkit-transform-origin: 0% 0%;
  31. -moz-transform-origin: 0% 0%;
  32. -o-transform-origin: 0% 0%;
  33. -ms-transform-origin: 0% 0%;
  34. transform-origin: 0% 0%;
  35. }
  36. .textLayer .highlight {
  37. margin: -1px;
  38. padding: 1px;
  39. background-color: rgb(180, 0, 170);
  40. border-radius: 4px;
  41. }
  42. .textLayer .highlight.begin {
  43. border-radius: 4px 0px 0px 4px;
  44. }
  45. .textLayer .highlight.end {
  46. border-radius: 0px 4px 4px 0px;
  47. }
  48. .textLayer .highlight.middle {
  49. border-radius: 0px;
  50. }
  51. .textLayer .highlight.selected {
  52. background-color: rgb(0, 100, 0);
  53. }
  54. .textLayer ::selection { background: rgb(0,0,255); }
  55. .textLayer ::-moz-selection { background: rgb(0,0,255); }
  56. .textLayer .endOfContent {
  57. display: block;
  58. position: absolute;
  59. left: 0px;
  60. top: 100%;
  61. right: 0px;
  62. bottom: 0px;
  63. z-index: -1;
  64. cursor: default;
  65. -webkit-user-select: none;
  66. -ms-user-select: none;
  67. -moz-user-select: none;
  68. }
  69. .textLayer .endOfContent.active {
  70. top: 0px;
  71. }
  72. .annotationLayer section {
  73. position: absolute;
  74. }
  75. .annotationLayer .linkAnnotation > a {
  76. position: absolute;
  77. font-size: 1em;
  78. top: 0;
  79. left: 0;
  80. width: 100%;
  81. height: 100%;
  82. }
  83. .annotationLayer .linkAnnotation > a /* -ms-a */ {
  84. background: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7") 0 0 repeat;
  85. }
  86. .annotationLayer .linkAnnotation > a:hover {
  87. opacity: 0.2;
  88. background: #ff0;
  89. box-shadow: 0px 2px 10px #ff0;
  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 #000;
  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: #000;
  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. -ms-appearance: none;
  189. appearance: none;
  190. padding: 0;
  191. }
  192. .annotationLayer .popupWrapper {
  193. position: absolute;
  194. width: 20em;
  195. }
  196. .annotationLayer .popup {
  197. position: absolute;
  198. z-index: 200;
  199. max-width: 20em;
  200. background-color: #FFFF99;
  201. box-shadow: 0px 2px 5px #333;
  202. border-radius: 2px;
  203. padding: 0.6em;
  204. margin-left: 5px;
  205. cursor: pointer;
  206. font: message-box;
  207. word-wrap: break-word;
  208. }
  209. .annotationLayer .popup h1 {
  210. font-size: 1em;
  211. border-bottom: 1px solid #000000;
  212. margin: 0;
  213. padding-bottom: 0.2em;
  214. }
  215. .annotationLayer .popup p {
  216. margin: 0;
  217. padding-top: 0.2em;
  218. }
  219. .annotationLayer .highlightAnnotation,
  220. .annotationLayer .underlineAnnotation,
  221. .annotationLayer .squigglyAnnotation,
  222. .annotationLayer .strikeoutAnnotation,
  223. .annotationLayer .lineAnnotation svg line,
  224. .annotationLayer .squareAnnotation svg rect,
  225. .annotationLayer .circleAnnotation svg ellipse,
  226. .annotationLayer .fileAttachmentAnnotation {
  227. cursor: pointer;
  228. }
  229. .pdfViewer .canvasWrapper {
  230. overflow: hidden;
  231. }
  232. .pdfViewer .page {
  233. direction: ltr;
  234. width: 816px;
  235. height: 1056px;
  236. margin: 1px auto -8px auto;
  237. position: relative;
  238. overflow: visible;
  239. border: 9px solid transparent;
  240. background-clip: content-box;
  241. border-image: url(images/shadow.png) 9 9 repeat;
  242. background-color: white;
  243. }
  244. .pdfViewer.removePageBorders .page {
  245. margin: 0px auto 10px auto;
  246. border: none;
  247. }
  248. .pdfViewer.singlePageView {
  249. display: inline-block;
  250. }
  251. .pdfViewer.singlePageView .page {
  252. margin: 0;
  253. border: none;
  254. }
  255. .pdfViewer .page canvas {
  256. margin: 0;
  257. display: block;
  258. }
  259. .pdfViewer .page canvas[hidden] {
  260. display: none;
  261. }
  262. .pdfViewer .page .loadingIcon {
  263. position: absolute;
  264. display: block;
  265. left: 0;
  266. top: 0;
  267. right: 0;
  268. bottom: 0;
  269. background: url('images/loading-icon.gif') center no-repeat;
  270. }
  271. .pdfPresentationMode:-webkit-full-screen .pdfViewer .page {
  272. margin-bottom: 100%;
  273. border: 0;
  274. }
  275. .pdfPresentationMode:-moz-full-screen .pdfViewer .page {
  276. margin-bottom: 100%;
  277. border: 0;
  278. }
  279. .pdfPresentationMode:-ms-fullscreen .pdfViewer .page {
  280. margin-bottom: 100% !important;
  281. border: 0;
  282. }
  283. .pdfPresentationMode:fullscreen .pdfViewer .page {
  284. margin-bottom: 100%;
  285. border: 0;
  286. }