pdf.less 8.4 KB

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