base.css 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab filetype=css: */
  2. /*!
  3. * Base CSS for pdf2htmlEX
  4. * Copyright 2012,2013 Lu Wang <coolwanglu@gmail.com>
  5. * https://github.com/coolwanglu/pdf2htmlEX/blob/master/share/LICENSE
  6. */
  7. /* Part 1: Web Page Layout: Free to modify, except for a few of them which are required by pdf2htmlEX.js, see the comments */
  8. #sidebar { /* Sidebar */
  9. position:absolute;
  10. top:0;
  11. left:0;
  12. bottom:0;
  13. width:250px;
  14. padding:0;
  15. margin:0px;
  16. overflow:auto;
  17. }
  18. #page-container { /* PDF container */
  19. position:absolute; /* required for calculating relative positions of pages in pdf2htmlEX.js */
  20. top:0;
  21. left:0px;
  22. margin:0;
  23. padding:0;
  24. border:0; /* required for lazy page loading in pdf2htmlEX.js (page visibility test) */
  25. }
  26. @media screen {
  27. /* for sidebar */
  28. #sidebar.opened + #page-container { left:250px; }
  29. #page-container {
  30. /* `bottom' and `right' are required for lazy page loading in pdf2htmlEX.js (page visibility test)
  31. * alternatively you may set width and height
  32. */
  33. bottom:0;
  34. right:0;
  35. overflow:auto;
  36. }
  37. .loading-indicator {
  38. display:none;
  39. }
  40. .loading-indicator.active {
  41. display:block;
  42. position:absolute;
  43. width:64px;
  44. height:64px;
  45. top:50%;
  46. left:50%;
  47. margin-top:-32px;
  48. margin-left:-32px;
  49. }
  50. .loading-indicator img {
  51. position:absolute;
  52. top:0;
  53. left:0;
  54. bottom:0;
  55. right:0;
  56. }
  57. }
  58. @media print {
  59. @page { margin:0; }
  60. html { margin:0; }
  61. body {
  62. margin:0;
  63. -webkit-print-color-adjust:exact; /* enable printing background images for WebKit */
  64. }
  65. #sidebar { display:none; }
  66. #page-container {
  67. width:auto;
  68. height:auto;
  69. overflow:visible;
  70. background-color:transparent;
  71. }
  72. .d { display:none; }
  73. }
  74. /* Part 2: Page Elements: Modify with caution
  75. * The followings are base classes, some of which are meant to be override by PDF specific classes
  76. * So do not increase the specificity (e.g. ".classname" -> "#page-container .classname")
  77. */
  78. .pf { /* page */
  79. position:relative;
  80. background-color:white;
  81. overflow: hidden;
  82. margin:0;
  83. border:0; /* required by pdf2htmlEX.js for page visibility test */
  84. }
  85. .pc { /* content of a page */
  86. position:absolute;
  87. border:0;
  88. padding:0;
  89. margin:0;
  90. top:0;
  91. left:0;
  92. width:100%;
  93. height:100%;
  94. overflow:hidden;
  95. display:block;
  96. /* set transform-origin for scaling */
  97. transform-origin:0% 0%;
  98. -ms-transform-origin:0% 0%;
  99. -webkit-transform-origin:0% 0%;
  100. }
  101. .pc.opened { /* used by pdf2htmlEX.js, to show/hide pages */
  102. display:block;
  103. }
  104. .bf { /* images that occupies the whole page */
  105. position:absolute;
  106. border:0;
  107. margin:0;
  108. top:0;
  109. bottom:0;
  110. width:100%;
  111. height:100%;
  112. -ms-user-select:none;
  113. -moz-user-select:none;
  114. -webkit-user-select:none;
  115. user-select:none;
  116. }
  117. .bi { /* images that cover only a part of the page */
  118. position:absolute;
  119. border:0;
  120. margin:0;
  121. -ms-user-select:none;
  122. -moz-user-select:none;
  123. -webkit-user-select:none;
  124. user-select:none;
  125. }
  126. @media print {
  127. .pf {
  128. margin:0;
  129. box-shadow:none;
  130. page-break-after:always;
  131. page-break-inside:avoid;
  132. }
  133. @-moz-document url-prefix() {
  134. /* fix page truncation for FireFox */
  135. .pf {
  136. overflow:visible;
  137. border:1px solid #FFFFFF;
  138. }
  139. .pc {overflow:visible;}
  140. }
  141. }
  142. .c { /* clip box */
  143. position:absolute;
  144. border:0;
  145. padding:0;
  146. margin:0;
  147. overflow:hidden;
  148. display:block;
  149. }
  150. .t { /* text line */
  151. position:absolute;
  152. white-space:pre;
  153. font-size:1px;
  154. transform-origin:0% 100%;
  155. -ms-transform-origin:0% 100%;
  156. -webkit-transform-origin:0% 100%;
  157. unicode-bidi:bidi-override;/* For rtl languages, e.g. Hebrew, we don't want the default Unicode behaviour */
  158. -moz-font-feature-settings:"liga" 0;/* We don't want Firefox to recognize ligatures */
  159. }
  160. .t:after { /* webkit #35443 */
  161. content: '';
  162. }
  163. .t:before { /* Workaround Blink(up to 41)/Webkit bug of word-spacing with leading spaces (chromium #404444 and pdf2htmlEX #412) */
  164. content: '';
  165. display: inline-block;
  166. }
  167. .t span { /* text blocks within a line */
  168. /* Blink(up to 41)/Webkit have bug with negative word-spacing and inline-block (pdf2htmlEX #416), so keep normal span inline. */
  169. position:relative;
  170. unicode-bidi:bidi-override; /* For rtl languages, e.g. Hebrew, we don't want the default Unicode behaviour */
  171. }
  172. ._ { /* text shift */
  173. /* Blink(up to 41)/Webkit have bug with inline element, continuous spaces and word-spacing. Workaround by inline-block. */
  174. display: inline-block;
  175. color: transparent;
  176. z-index: -1;
  177. }
  178. /* selection background should not be opaque, for fallback mode */
  179. ::selection{
  180. background: rgba(127,255,255,0.4);
  181. }
  182. ::-moz-selection{
  183. background: rgba(127,255,255,0.4);
  184. }
  185. .pi { /* info for Javascript */
  186. display:none;
  187. }
  188. .l { /* annotation links */
  189. }
  190. /* transparent color - WebKit */
  191. .d { /* css drawing */
  192. position:absolute;
  193. transform-origin:0% 100%;
  194. -ms-transform-origin:0% 100%;
  195. -webkit-transform-origin:0% 100%;
  196. }
  197. /* for the forms */
  198. .it {
  199. border: none;
  200. background-color: rgba(255, 255, 255, 0.0);
  201. }
  202. .ir:hover {
  203. cursor: pointer;
  204. }
  205. /* Base CSS END */