viewer-geckoview.css 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367
  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. @import url(pdf_viewer.css);
  16. :root {
  17. --dir-factor: 1;
  18. --scale-select-width: 140px;
  19. --toolbar-icon-opacity: 0.7;
  20. --doorhanger-icon-opacity: 0.9;
  21. --main-color: rgba(12, 12, 13, 1);
  22. --body-bg-color: rgba(237, 237, 240, 1);
  23. --scrollbar-color: auto;
  24. --scrollbar-bg-color: auto;
  25. --dialog-button-border: none;
  26. --dialog-button-bg-color: rgba(12, 12, 13, 0.1);
  27. --dialog-button-hover-bg-color: rgba(12, 12, 13, 0.3);
  28. }
  29. :root:dir(rtl) {
  30. --dir-factor: -1;
  31. }
  32. @media (prefers-color-scheme: dark) {
  33. :root {
  34. --main-color: rgba(249, 249, 250, 1);
  35. --body-bg-color: rgba(42, 42, 46, 1);
  36. --progressBar-color: rgba(0, 96, 223, 1);
  37. --progressBar-indeterminate-bg-color: rgba(40, 40, 43, 1);
  38. --progressBar-indeterminate-blend-color: rgba(20, 68, 133, 1);
  39. --scrollbar-color: rgba(121, 121, 123, 1);
  40. --scrollbar-bg-color: rgba(35, 35, 39, 1);
  41. --dialog-button-bg-color: rgba(92, 92, 97, 1);
  42. --dialog-button-hover-bg-color: rgba(115, 115, 115, 1);
  43. }
  44. }
  45. @media screen and (forced-colors: active) {
  46. :root {
  47. --dialog-button-border: 1px solid Highlight;
  48. --dialog-button-hover-bg-color: Highlight;
  49. --dialog-button-hover-color: ButtonFace;
  50. --main-color: CanvasText;
  51. }
  52. }
  53. * {
  54. padding: 0;
  55. margin: 0;
  56. }
  57. html,
  58. body {
  59. height: 100%;
  60. width: 100%;
  61. }
  62. body {
  63. background-color: var(--body-bg-color);
  64. scrollbar-color: var(--scrollbar-color) var(--scrollbar-bg-color);
  65. }
  66. .hidden,
  67. [hidden] {
  68. display: none !important;
  69. }
  70. #outerContainer {
  71. width: 100%;
  72. height: 100%;
  73. position: relative;
  74. }
  75. #mainContainer {
  76. position: absolute;
  77. top: 0;
  78. right: 0;
  79. bottom: 0;
  80. left: 0;
  81. min-width: 350px;
  82. }
  83. #viewerContainer {
  84. overflow: auto;
  85. position: absolute;
  86. top: 0;
  87. right: 0;
  88. bottom: 0;
  89. left: 0;
  90. outline: none;
  91. }
  92. #viewerContainer {
  93. transition-duration: var(--sidebar-transition-duration);
  94. transition-timing-function: var(--sidebar-transition-timing-function);
  95. }
  96. .dialogButton {
  97. border: none;
  98. background: none;
  99. width: 28px;
  100. height: 28px;
  101. outline: none;
  102. }
  103. .dialogButton:hover,
  104. .dialogButton:focus-visible {
  105. background-color: var(--dialog-button-hover-bg-color);
  106. }
  107. .dialogButton:hover > span,
  108. .dialogButton:focus-visible > span {
  109. color: var(--dialog-button-hover-color);
  110. }
  111. .dialogButton[disabled] {
  112. opacity: 0.5;
  113. }
  114. .dialogButton {
  115. min-width: 16px;
  116. margin: 2px 1px;
  117. padding: 2px 6px 0;
  118. border: none;
  119. border-radius: 2px;
  120. color: var(--main-color);
  121. font-size: 12px;
  122. line-height: 14px;
  123. user-select: none;
  124. cursor: default;
  125. box-sizing: border-box;
  126. }
  127. .toolbarField {
  128. padding: 4px 7px;
  129. margin: 3px 0;
  130. border-radius: 2px;
  131. background-color: var(--field-bg-color);
  132. background-clip: padding-box;
  133. border: 1px solid var(--field-border-color);
  134. box-shadow: none;
  135. color: var(--field-color);
  136. font-size: 12px;
  137. line-height: 16px;
  138. outline: none;
  139. }
  140. .toolbarField:focus {
  141. border-color: #0a84ff;
  142. }
  143. .dialogButton {
  144. width: auto;
  145. margin: 3px 4px 2px !important;
  146. padding: 2px 11px;
  147. color: var(--main-color);
  148. background-color: var(--dialog-button-bg-color);
  149. border: var(--dialog-button-border) !important;
  150. }
  151. dialog {
  152. margin: auto;
  153. padding: 15px;
  154. border-spacing: 4px;
  155. color: var(--main-color);
  156. font: message-box;
  157. font-size: 12px;
  158. line-height: 14px;
  159. background-color: var(--doorhanger-bg-color);
  160. border: 1px solid rgba(0, 0, 0, 0.5);
  161. border-radius: 4px;
  162. box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  163. }
  164. dialog::backdrop {
  165. background-color: rgba(0, 0, 0, 0.2);
  166. }
  167. dialog > .row {
  168. display: table-row;
  169. }
  170. dialog > .row > * {
  171. display: table-cell;
  172. }
  173. dialog .toolbarField {
  174. margin: 5px 0;
  175. }
  176. dialog .separator {
  177. display: block;
  178. margin: 4px 0;
  179. height: 1px;
  180. width: 100%;
  181. background-color: var(--separator-color);
  182. }
  183. dialog .buttonRow {
  184. text-align: center;
  185. vertical-align: middle;
  186. }
  187. dialog :link {
  188. color: rgba(255, 255, 255, 1);
  189. }
  190. #passwordDialog {
  191. text-align: center;
  192. }
  193. #passwordDialog .toolbarField {
  194. width: 200px;
  195. }
  196. .grab-to-pan-grab {
  197. cursor: grab !important;
  198. }
  199. .grab-to-pan-grab
  200. *:not(input):not(textarea):not(button):not(select):not(:link) {
  201. cursor: inherit !important;
  202. }
  203. .grab-to-pan-grab:active,
  204. .grab-to-pan-grabbing {
  205. cursor: grabbing !important;
  206. position: fixed;
  207. background: rgba(0, 0, 0, 0);
  208. display: block;
  209. top: 0;
  210. left: 0;
  211. right: 0;
  212. bottom: 0;
  213. overflow: hidden;
  214. z-index: 50000; /* should be higher than anything else in PDF.js! */
  215. }
  216. @page {
  217. margin: 0;
  218. }
  219. #printContainer {
  220. display: none;
  221. }
  222. @media print {
  223. body {
  224. background: rgba(0, 0, 0, 0) none;
  225. }
  226. body[data-pdfjsprinting] #outerContainer {
  227. display: none;
  228. }
  229. body[data-pdfjsprinting] #printContainer {
  230. display: block;
  231. }
  232. #printContainer {
  233. height: 100%;
  234. }
  235. /* wrapper around (scaled) print canvas elements */
  236. #printContainer > .printedPage {
  237. page-break-after: always;
  238. page-break-inside: avoid;
  239. /* The wrapper always cover the whole page. */
  240. height: 100%;
  241. width: 100%;
  242. display: flex;
  243. flex-direction: column;
  244. justify-content: center;
  245. align-items: center;
  246. }
  247. #printContainer > .xfaPrintedPage .xfaPage {
  248. position: absolute;
  249. }
  250. #printContainer > .xfaPrintedPage {
  251. page-break-after: always;
  252. page-break-inside: avoid;
  253. width: 100%;
  254. height: 100%;
  255. position: relative;
  256. }
  257. #printContainer > .printedPage canvas,
  258. #printContainer > .printedPage img {
  259. /* The intrinsic canvas / image size will make sure that we fit the page. */
  260. max-width: 100%;
  261. max-height: 100%;
  262. direction: ltr;
  263. display: block;
  264. }
  265. }
  266. .visibleLargeView,
  267. .visibleMediumView {
  268. display: none;
  269. }
  270. @media all and (max-width: 900px) {
  271. #toolbarViewerMiddle {
  272. display: table;
  273. margin: auto;
  274. left: auto;
  275. position: inherit;
  276. transform: none;
  277. }
  278. }
  279. @media all and (max-width: 840px) {
  280. #sidebarContainer {
  281. background-color: var(--sidebar-narrow-bg-color);
  282. }
  283. #outerContainer.sidebarOpen #viewerContainer {
  284. inset-inline-start: 0 !important;
  285. }
  286. }
  287. @media all and (max-width: 820px) {
  288. #outerContainer .hiddenLargeView {
  289. display: none;
  290. }
  291. #outerContainer .visibleLargeView {
  292. display: inherit;
  293. }
  294. }
  295. @media all and (max-width: 750px) {
  296. #outerContainer .hiddenMediumView {
  297. display: none;
  298. }
  299. #outerContainer .visibleMediumView {
  300. display: inherit;
  301. }
  302. }
  303. @media all and (max-width: 690px) {
  304. .hiddenSmallView,
  305. .hiddenSmallView * {
  306. display: none;
  307. }
  308. .toolbarButtonSpacer {
  309. width: 0;
  310. }
  311. .findbar {
  312. inset-inline-start: 34px;
  313. }
  314. }
  315. @media all and (max-width: 560px) {
  316. #scaleSelectContainer {
  317. display: none;
  318. }
  319. }