pdf.less 8.6 KB

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