pdf.less 7.6 KB

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