pdf.less 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427
  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. > .synctex-control-icon {
  220. display: inline-block;
  221. font: normal normal normal 14px/1 FontAwesome;
  222. font-size: inherit;
  223. text-rendering: auto;
  224. -webkit-font-smoothing: antialiased;
  225. -moz-osx-font-smoothing: grayscale;
  226. }
  227. }
  228. .synctex-control-goto-pdf > .synctex-control-icon {
  229. text-indent: 1px; // "Optical" adjustment.
  230. &::before {
  231. content: '\f061';
  232. }
  233. }
  234. .synctex-control-goto-code > .synctex-control-icon {
  235. text-indent: -1px; // "Optical" adjustment.
  236. &::before {
  237. content: '\f060';
  238. }
  239. }
  240. .editor-dark {
  241. .pdf-logs {
  242. background-color: lighten(@editor-dark-background-color, 10%);
  243. }
  244. .pdfjs-viewer {
  245. background-color: lighten(@editor-dark-background-color, 10%);
  246. }
  247. .pdf .toolbar {
  248. .toolbar-right a {
  249. i {
  250. border-color: @gray;
  251. }
  252. &:hover {
  253. i {
  254. border-color: @gray-light;
  255. }
  256. }
  257. }
  258. }
  259. }
  260. .keyboard-tooltip {
  261. .tooltip-inner {
  262. max-width: none;
  263. }
  264. }
  265. .keyboard-shortcut {
  266. white-space: nowrap;
  267. }
  268. @keyframes expand-feedback-area {
  269. from {
  270. max-height: 0;
  271. }
  272. to {
  273. max-height: 500px;
  274. }
  275. }
  276. .card-hint:extend(.card-thin) {
  277. margin-top: 10px;
  278. padding-bottom: 7px;
  279. cursor: default;
  280. &-icon-container {
  281. background: currentColor;
  282. width: 2.5rem;
  283. height: 2.5rem;
  284. font-size: 1.5rem;
  285. text-align: center;
  286. border-radius: 50%;
  287. float: left;
  288. margin-right: 10px;
  289. .fa {
  290. color: #fff;
  291. }
  292. .alert-danger & {
  293. color: @state-danger-border;
  294. }
  295. .alert-warning & {
  296. color: @state-warning-border;
  297. }
  298. .alert-info & {
  299. color: @state-info-border;
  300. }
  301. }
  302. &-text,
  303. &-feedback-label {
  304. color: @log-hints-color;
  305. font-size: 0.9rem;
  306. margin-bottom: 20px;
  307. }
  308. &-text {
  309. min-height: 35px;
  310. }
  311. &-feedback-label {
  312. font-size: inherit;
  313. margin-right: 0.5em;
  314. margin-bottom: 0;
  315. font-weight: normal;
  316. }
  317. &-ext-link,
  318. &-feedback {
  319. display: inline-block;
  320. font-size: 0.8rem;
  321. }
  322. &-footer a,
  323. &-text a {
  324. .alert-danger & {
  325. color: @state-danger-text;
  326. }
  327. .alert-warning & {
  328. color: @state-warning-text;
  329. }
  330. .alert-info & {
  331. color: @state-info-text;
  332. }
  333. }
  334. &-feedback {
  335. color: @log-hints-color;
  336. float: right;
  337. }
  338. &-extra-feedback {
  339. color: @log-hints-color;
  340. font-size: 0.8rem;
  341. margin-top: 10px;
  342. padding-bottom: 5px;
  343. animation: 0.5s ease-out expand-feedback-area;
  344. overflow: hidden;
  345. &-label {
  346. margin: 5px 0 10px;
  347. padding-top: 5px;
  348. border-top: solid 1px @gray-lighter;
  349. }
  350. .radio {
  351. margin: 5px;
  352. }
  353. textarea {
  354. font-size: 0.8rem;
  355. margin-bottom: 10px;
  356. padding: 5px;
  357. }
  358. input[type='radio'] {
  359. margin-top: 2px;
  360. }
  361. }
  362. & + p {
  363. margin-top: 20px;
  364. }
  365. }
  366. .files-dropdown-container {
  367. .pull-right();
  368. position: relative;
  369. }
  370. .files-dropdown {
  371. display: inline-block;
  372. }
  373. .plv-text-layer {
  374. display: none;
  375. user-select: text;
  376. .pdf-page-container:hover &,
  377. .pdfjs-viewer-show-text & {
  378. display: block;
  379. }
  380. }