viewer.css 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. /* Copyright 2016 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. :root {
  16. --progressBar-percent: 0%;
  17. }
  18. * {
  19. padding: 0;
  20. margin: 0;
  21. }
  22. html {
  23. height: 100%;
  24. width: 100%;
  25. overflow: hidden;
  26. font-size: 10px;
  27. }
  28. header {
  29. background-color: rgba(244, 244, 244, 1);
  30. }
  31. header h1 {
  32. border-bottom: 1px solid rgba(216, 216, 216, 1);
  33. color: rgba(133, 133, 133, 1);
  34. font-size: 23px;
  35. font-style: italic;
  36. font-weight: normal;
  37. overflow: hidden;
  38. padding: 10px;
  39. text-align: center;
  40. text-overflow: ellipsis;
  41. white-space: nowrap;
  42. }
  43. body {
  44. background: url(images/document_bg.png);
  45. color: rgba(255, 255, 255, 1);
  46. font-family: sans-serif;
  47. font-size: 10px;
  48. height: 100%;
  49. width: 100%;
  50. overflow: hidden;
  51. padding-bottom: 5rem;
  52. }
  53. section {
  54. position: absolute;
  55. top: 0;
  56. left: 0;
  57. width: 100%;
  58. height: 100%;
  59. overflow: hidden;
  60. font-size: 2rem;
  61. }
  62. footer {
  63. background-image: url(images/toolbar_background.png);
  64. height: 4rem;
  65. position: absolute;
  66. bottom: 0;
  67. left: 0;
  68. right: 0;
  69. z-index: 1;
  70. box-shadow: 0 -0.2rem 0.5rem rgba(50, 50, 50, 0.75);
  71. }
  72. .toolbarButton {
  73. display: block;
  74. padding: 0;
  75. margin: 0;
  76. border-width: 0;
  77. background-position: center center;
  78. background-repeat: no-repeat;
  79. background-color: rgba(0, 0, 0, 0);
  80. }
  81. .toolbarButton.pageUp {
  82. position: absolute;
  83. width: 18%;
  84. height: 100%;
  85. left: 0;
  86. background-image: url(images/icon_previous_page.png);
  87. background-size: 2rem;
  88. }
  89. .toolbarButton.pageDown {
  90. position: absolute;
  91. width: 18%;
  92. height: 100%;
  93. left: 18%;
  94. background-image: url(images/icon_next_page.png);
  95. background-size: 2rem;
  96. }
  97. #pageNumber {
  98. -moz-appearance: textfield; /* hides the spinner in moz */
  99. position: absolute;
  100. width: 28%;
  101. height: 100%;
  102. left: 36%;
  103. text-align: center;
  104. border: 0;
  105. background-color: rgba(0, 0, 0, 0);
  106. font-size: 1.2rem;
  107. color: rgba(255, 255, 255, 1);
  108. background-image: url(images/div_line_left.png),
  109. url(images/div_line_right.png);
  110. background-repeat: no-repeat;
  111. background-position: left, right;
  112. background-size: 0.2rem, 0.2rem;
  113. }
  114. .toolbarButton.zoomOut {
  115. position: absolute;
  116. width: 18%;
  117. height: 100%;
  118. left: 64%;
  119. background-image: url(images/icon_zoom_out.png);
  120. background-size: 2.4rem;
  121. }
  122. .toolbarButton.zoomIn {
  123. position: absolute;
  124. width: 18%;
  125. height: 100%;
  126. left: 82%;
  127. background-image: url(images/icon_zoom_in.png);
  128. background-size: 2.4rem;
  129. }
  130. .toolbarButton[disabled] {
  131. opacity: 0.3;
  132. }
  133. .hidden {
  134. display: none;
  135. }
  136. [hidden] {
  137. display: none !important;
  138. }
  139. #viewerContainer {
  140. position: absolute;
  141. overflow: auto;
  142. width: 100%;
  143. top: 5rem;
  144. bottom: 4rem;
  145. left: 0;
  146. right: 0;
  147. }
  148. canvas {
  149. margin: auto;
  150. display: block;
  151. }
  152. .pdfViewer .page .loadingIcon {
  153. width: 2.9rem;
  154. height: 2.9rem;
  155. background: url("images/spinner.png") no-repeat left top / 38rem;
  156. border: medium none;
  157. animation: 1s steps(10, end) 0s normal none infinite moveDefault;
  158. display: block;
  159. position: absolute;
  160. top: calc((100% - 2.9rem) / 2);
  161. left: calc((100% - 2.9rem) / 2);
  162. }
  163. @keyframes moveDefault {
  164. from {
  165. background-position: 0 top;
  166. }
  167. to {
  168. background-position: -39rem top;
  169. }
  170. }
  171. #loadingBar {
  172. position: relative;
  173. height: 0.6rem;
  174. background-color: rgba(51, 51, 51, 1);
  175. border-bottom: 1px solid rgba(51, 51, 51, 1);
  176. }
  177. #loadingBar .progress {
  178. position: absolute;
  179. left: 0;
  180. width: 100%;
  181. transform: scaleX(var(--progressBar-percent));
  182. transform-origin: 0 0;
  183. height: 100%;
  184. background-color: rgba(221, 221, 221, 1);
  185. overflow: hidden;
  186. transition: transform 200ms;
  187. }
  188. @keyframes progressIndeterminate {
  189. 0% {
  190. transform: translateX(0%);
  191. }
  192. 50% {
  193. transform: translateX(100%);
  194. }
  195. 100% {
  196. transform: translateX(100%);
  197. }
  198. }
  199. #loadingBar.indeterminate .progress {
  200. transform: none;
  201. background-color: rgba(153, 153, 153, 1);
  202. transition: none;
  203. }
  204. #loadingBar.indeterminate .progress .glimmer {
  205. position: absolute;
  206. top: 0;
  207. left: 0;
  208. height: 100%;
  209. width: 5rem;
  210. background-image: linear-gradient(
  211. to right,
  212. rgba(153, 153, 153, 1) 0%,
  213. rgba(255, 255, 255, 1) 50%,
  214. rgba(153, 153, 153, 1) 100%
  215. );
  216. background-size: 100% 100%;
  217. background-repeat: no-repeat;
  218. animation: progressIndeterminate 2s linear infinite;
  219. }
  220. #errorWrapper {
  221. background: none repeat scroll 0 0 rgba(255, 85, 85, 1);
  222. color: rgba(255, 255, 255, 1);
  223. left: 0;
  224. position: absolute;
  225. right: 0;
  226. top: 3.2rem;
  227. z-index: 1000;
  228. padding: 0.3rem;
  229. font-size: 0.8em;
  230. }
  231. #errorMessageLeft {
  232. float: left;
  233. }
  234. #errorMessageRight {
  235. float: right;
  236. }
  237. #errorMoreInfo {
  238. background-color: rgba(255, 255, 255, 1);
  239. color: rgba(0, 0, 0, 1);
  240. padding: 0.3rem;
  241. margin: 0.3rem;
  242. width: 98%;
  243. }