pdf.less 8.5 KB

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