pdf.less 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440
  1. @stripe-width: 20px;
  2. @keyframes pdf-toolbar-stripes {
  3. from {
  4. background-position: 0 0;
  5. }
  6. to {
  7. background-position: @stripe-width 0;
  8. }
  9. }
  10. .pdf .toolbar.toolbar-pdf {
  11. .toolbar-small-mixin;
  12. .toolbar-alt-mixin;
  13. padding-right: 5px;
  14. &.changes-to-autocompile {
  15. #gradient > .striped(@color: rgba(255, 255, 255, 0.1), @angle: -45deg);
  16. background-size: @stripe-width @stripe-width;
  17. .animation(pdf-toolbar-stripes 2s linear infinite);
  18. }
  19. .auto-compile-status {
  20. color: white;
  21. margin-right: (@line-height-computed / 2);
  22. i {
  23. color: @brand-danger;
  24. }
  25. }
  26. .auto-compile-status when (@is-overleaf-light = true) {
  27. color: @ol-blue-gray-3;
  28. }
  29. }
  30. .pdf .toolbar.toolbar-pdf when (@is-overleaf-light = false) {
  31. border-bottom: 0;
  32. }
  33. .pdf {
  34. background-color: @pdf-bg;
  35. }
  36. .pdf-viewer,
  37. .pdf-logs,
  38. .pdf-errors,
  39. .pdf-uncompiled {
  40. .full-size;
  41. top: @pdf-top-offset;
  42. }
  43. .pdf-logs,
  44. .pdf-errors,
  45. .pdf-uncompiled,
  46. .pdf-validation-problems {
  47. padding: @line-height-computed / 2;
  48. }
  49. .pdf-uncompiled {
  50. .fa {
  51. color: @blue;
  52. }
  53. }
  54. .btn-recompile-group {
  55. align-self: stretch;
  56. margin-right: 6px;
  57. .btn-recompile {
  58. height: 100%;
  59. .btn-primary;
  60. padding-top: 3px;
  61. padding-bottom: 3px;
  62. &:first-child {
  63. border-top-left-radius: 0;
  64. border-bottom-left-radius: 0;
  65. }
  66. &[disabled] {
  67. background-color: mix(@btn-primary-bg, @toolbar-alt-bg-color, 65%);
  68. .opacity(1);
  69. }
  70. }
  71. }
  72. .btn-recompile-label {
  73. margin-left: @line-height-computed / 4;
  74. }
  75. .pdf-viewer {
  76. iframe {
  77. width: 100%;
  78. height: 100%;
  79. border: none;
  80. }
  81. .pdfjs-viewer {
  82. .full-size;
  83. background-color: @pdfjs-bg;
  84. overflow: scroll;
  85. canvas,
  86. div.pdf-canvas {
  87. background: white;
  88. box-shadow: @pdf-page-shadow-color 0px 0px 10px;
  89. }
  90. div.pdf-canvas.pdfng-empty {
  91. background-color: white;
  92. }
  93. div.pdf-canvas.pdfng-loading {
  94. background-color: white;
  95. }
  96. .page-container {
  97. margin: 10px auto;
  98. padding: 0 10px;
  99. box-sizing: content-box;
  100. user-select: none;
  101. }
  102. }
  103. .progress-thin {
  104. position: absolute;
  105. top: -2px;
  106. height: 3px;
  107. left: 0;
  108. right: 0;
  109. .progress-bar {
  110. height: 100%;
  111. background-color: @link-color;
  112. }
  113. }
  114. .pdfjs-controls {
  115. position: absolute;
  116. padding: @line-height-computed / 2;
  117. top: 0;
  118. left: 0;
  119. display: inline-block;
  120. .btn-group {
  121. transition: opacity 0.5s ease, visibility 0 linear 0.5s;
  122. visibility: hidden;
  123. opacity: 0;
  124. }
  125. &:hover,
  126. &.flash {
  127. .btn-group {
  128. transition: none;
  129. visibility: visible;
  130. opacity: 1;
  131. }
  132. }
  133. i.fa-arrows-h {
  134. border-right: 2px solid white;
  135. border-left: 2px solid white;
  136. }
  137. i.fa-arrows-v {
  138. border-top: 2px solid white;
  139. border-bottom: 2px solid white;
  140. }
  141. }
  142. }
  143. .pdf-logs {
  144. overflow: auto;
  145. .alert {
  146. font-size: 0.9rem;
  147. margin-bottom: @line-height-computed / 2;
  148. cursor: pointer;
  149. .line-no {
  150. float: right;
  151. color: @log-line-no-color;
  152. font-weight: 700;
  153. .fa {
  154. opacity: 0;
  155. }
  156. }
  157. .entry-message {
  158. font-weight: 700;
  159. //font-family: @font-family-monospace;
  160. }
  161. .entry-content {
  162. white-space: pre-wrap;
  163. font-size: 0.8rem;
  164. //font-family: @font-family-monospace;
  165. }
  166. &:hover .line-no {
  167. color: inherit;
  168. .fa {
  169. opacity: 1;
  170. }
  171. }
  172. &.alert-danger {
  173. background-color: tint(@alert-danger-bg, 15%);
  174. &:hover {
  175. background-color: @alert-danger-bg;
  176. }
  177. }
  178. &.alert-warning {
  179. background-color: tint(@alert-warning-bg, 15%);
  180. &:hover {
  181. background-color: @alert-warning-bg;
  182. }
  183. }
  184. &.alert-info {
  185. background-color: tint(@alert-info-bg, 15%);
  186. &:hover {
  187. background-color: @alert-info-bg;
  188. }
  189. }
  190. }
  191. pre {
  192. font-size: 12px;
  193. }
  194. .dropdown {
  195. position: relative;
  196. }
  197. .force-recompile {
  198. margin-top: 10px;
  199. text-align: right;
  200. }
  201. }
  202. .synctex-controls {
  203. margin-right: -8px;
  204. position: absolute;
  205. z-index: @synctex-controls-z-index;
  206. padding: @synctex-controls-padding;
  207. top: 68px;
  208. }
  209. .synctex-control {
  210. @ol-synctex-control-size: 24px;
  211. align-items: center;
  212. display: flex;
  213. justify-content: center;
  214. font-size: 1em;
  215. margin-bottom: @ol-synctex-control-size / 2;
  216. width: @ol-synctex-control-size;
  217. height: @ol-synctex-control-size;
  218. border-radius: @ol-synctex-control-size / 2;
  219. padding: 0 0 2px;
  220. background-color: fade(@btn-default-bg, 80%);
  221. transition: background 0.15s ease;
  222. &[disabled] {
  223. opacity: 1;
  224. background-color: fade(@btn-default-bg, 60%);
  225. }
  226. > .synctex-control-icon {
  227. display: inline-block;
  228. font: normal normal normal 14px/1 FontAwesome;
  229. font-size: inherit;
  230. text-rendering: auto;
  231. -webkit-font-smoothing: antialiased;
  232. -moz-osx-font-smoothing: grayscale;
  233. }
  234. > .synctex-spin-icon {
  235. margin-top: 2px;
  236. }
  237. }
  238. .synctex-control-goto-pdf > .synctex-control-icon {
  239. text-indent: 1px; // "Optical" adjustment.
  240. &::before {
  241. content: '\f061';
  242. }
  243. }
  244. .synctex-control-goto-code > .synctex-control-icon {
  245. text-indent: -1px; // "Optical" adjustment.
  246. &::before {
  247. content: '\f060';
  248. }
  249. }
  250. .editor-dark {
  251. .pdf-logs {
  252. background-color: lighten(@editor-dark-background-color, 10%);
  253. }
  254. .pdfjs-viewer {
  255. background-color: lighten(@editor-dark-background-color, 10%);
  256. }
  257. .pdf .toolbar {
  258. .toolbar-right a {
  259. i {
  260. border-color: @gray;
  261. }
  262. &:hover {
  263. i {
  264. border-color: @gray-light;
  265. }
  266. }
  267. }
  268. }
  269. }
  270. .keyboard-tooltip {
  271. .tooltip-inner {
  272. max-width: none;
  273. }
  274. }
  275. .keyboard-shortcut {
  276. white-space: nowrap;
  277. }
  278. @keyframes expand-feedback-area {
  279. from {
  280. max-height: 0;
  281. }
  282. to {
  283. max-height: 500px;
  284. }
  285. }
  286. .card-hint:extend(.card-thin) {
  287. margin-top: 10px;
  288. padding-bottom: 7px;
  289. cursor: default;
  290. &-icon-container {
  291. background: currentColor;
  292. width: 2.5rem;
  293. height: 2.5rem;
  294. font-size: 1.5rem;
  295. text-align: center;
  296. border-radius: 50%;
  297. float: left;
  298. margin-right: 10px;
  299. .fa {
  300. color: #fff;
  301. }
  302. .alert-danger & {
  303. color: @state-danger-border;
  304. }
  305. .alert-warning & {
  306. color: @state-warning-border;
  307. }
  308. .alert-info & {
  309. color: @state-info-border;
  310. }
  311. }
  312. &-text,
  313. &-feedback-label {
  314. color: @log-hints-color;
  315. font-size: 0.9rem;
  316. margin-bottom: 20px;
  317. }
  318. &-text {
  319. min-height: 35px;
  320. }
  321. &-feedback-label {
  322. font-size: inherit;
  323. margin-right: 0.5em;
  324. margin-bottom: 0;
  325. font-weight: normal;
  326. }
  327. &-ext-link,
  328. &-feedback {
  329. display: inline-block;
  330. font-size: 0.8rem;
  331. }
  332. &-footer a,
  333. &-text a {
  334. .alert-danger & {
  335. color: @state-danger-text;
  336. }
  337. .alert-warning & {
  338. color: @state-warning-text;
  339. }
  340. .alert-info & {
  341. color: @state-info-text;
  342. }
  343. }
  344. &-feedback {
  345. color: @log-hints-color;
  346. float: right;
  347. }
  348. &-extra-feedback {
  349. color: @log-hints-color;
  350. font-size: 0.8rem;
  351. margin-top: 10px;
  352. padding-bottom: 5px;
  353. animation: 0.5s ease-out expand-feedback-area;
  354. overflow: hidden;
  355. &-label {
  356. margin: 5px 0 10px;
  357. padding-top: 5px;
  358. border-top: solid 1px @gray-lighter;
  359. }
  360. .radio {
  361. margin: 5px;
  362. }
  363. textarea {
  364. font-size: 0.8rem;
  365. margin-bottom: 10px;
  366. padding: 5px;
  367. }
  368. input[type='radio'] {
  369. margin-top: 2px;
  370. }
  371. }
  372. & + p {
  373. margin-top: 20px;
  374. }
  375. }
  376. .files-dropdown-container {
  377. .pull-right();
  378. position: relative;
  379. }
  380. .files-dropdown {
  381. display: inline-block;
  382. }
  383. .plv-text-layer {
  384. display: none;
  385. user-select: text;
  386. .pdf-page-container:hover &,
  387. .pdfjs-viewer-show-text & {
  388. display: block;
  389. }
  390. }