app/assets/stylesheets/pdfjs_viewer/pdfjs/viewer.css in pdfjs_viewer-rails-0.0.6 vs app/assets/stylesheets/pdfjs_viewer/pdfjs/viewer.css in pdfjs_viewer-rails-0.0.7

- old
+ new

@@ -18,10 +18,12 @@ left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; + opacity: 0.2; + line-height: 1.0; } .textLayer > div { color: transparent; position: absolute; @@ -56,118 +58,143 @@ .textLayer .highlight.selected { background-color: rgb(0, 100, 0); } -.pdfViewer .canvasWrapper { - overflow: hidden; -} +.textLayer ::selection { background: rgb(0,0,255); } +.textLayer ::-moz-selection { background: rgb(0,0,255); } -.pdfViewer .page { - direction: ltr; - width: 816px; - height: 1056px; - margin: 1px auto -8px auto; - position: relative; - overflow: visible; - border: 9px solid transparent; - background-clip: content-box; - border-image: url(/pdfjs/web/images/shadow.png) 9 9 repeat; - background-color: white; +.textLayer .endOfContent { + display: block; + position: absolute; + left: 0px; + top: 100%; + right: 0px; + bottom: 0px; + z-index: -1; + cursor: default; + -webkit-user-select: none; + -ms-user-select: none; + -moz-user-select: none; } -.pdfViewer .page canvas { - margin: 0; - display: block; +.textLayer .endOfContent.active { + top: 0px; } -.pdfViewer .page .loadingIcon { + +.annotationLayer section { position: absolute; - display: block; - left: 0; - top: 0; - right: 0; - bottom: 0; - background: url('/pdfjs/web/images/loading-icon.gif') center no-repeat; } -.pdfViewer .page .annotLink > a:hover { +.annotationLayer .annotLink > a:hover { opacity: 0.2; background: #ff0; box-shadow: 0px 2px 10px #ff0; } -:-webkit-full-screen .pdfViewer .page { - margin-bottom: 100%; - border: 0; -} - -:-moz-full-screen .pdfViewer .page { - margin-bottom: 100%; - border: 0; -} - -:-ms-fullscreen .pdfViewer .page { - margin-bottom: 100% !important; - border: 0; -} - -:fullscreen .pdfViewer .page { - margin-bottom: 100%; - border: 0; -} - -.pdfViewer .page .annotationHighlight { +.annotationLayer .annotText > img { position: absolute; - border: 2px #FFFF99 solid; -} - -.pdfViewer .page .annotText > img { - position: absolute; cursor: pointer; } -.pdfViewer .page .annotTextContentWrapper { +.annotationLayer .annotTextContentWrapper { position: absolute; width: 20em; } -.pdfViewer .page .annotTextContent { +.annotationLayer .annotTextContent { z-index: 200; float: left; max-width: 20em; background-color: #FFFF99; box-shadow: 0px 2px 5px #333; border-radius: 2px; padding: 0.6em; cursor: pointer; } -.pdfViewer .page .annotTextContent > h1 { +.annotationLayer .annotTextContent > h1 { font-size: 1em; border-bottom: 1px solid #000000; padding-bottom: 0.2em; } -.pdfViewer .page .annotTextContent > p { +.annotationLayer .annotTextContent > p { padding-top: 0.2em; } -.pdfViewer .page .annotLink > a { +.annotationLayer .annotLink > a { position: absolute; font-size: 1em; top: 0; left: 0; width: 100%; height: 100%; } -.pdfViewer .page .annotLink > a /* -ms-a */ { - background: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAA\ - LAAAAAABAAEAAAIBRAA7") 0 0 repeat; +.annotationLayer .annotLink > a /* -ms-a */ { + background: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7") 0 0 repeat; } +.pdfViewer .canvasWrapper { + overflow: hidden; +} + +.pdfViewer .page { + direction: ltr; + width: 816px; + height: 1056px; + margin: 1px auto -8px auto; + position: relative; + overflow: visible; + border: 9px solid transparent; + background-clip: content-box; + border-image: url(/pdfjs/web/images/shadow.png) 9 9 repeat; + background-color: white; +} + +.pdfViewer.removePageBorders .page { + margin: 0px auto 10px auto; + border: none; +} + +.pdfViewer .page canvas { + margin: 0; + display: block; +} + +.pdfViewer .page .loadingIcon { + position: absolute; + display: block; + left: 0; + top: 0; + right: 0; + bottom: 0; + background: url('/pdfjs/web/images/loading-icon.gif') center no-repeat; +} + +.pdfPresentationMode:-webkit-full-screen .pdfViewer .page { + margin-bottom: 100%; + border: 0; +} + +.pdfPresentationMode:-moz-full-screen .pdfViewer .page { + margin-bottom: 100%; + border: 0; +} + +.pdfPresentationMode:-ms-fullscreen .pdfViewer .page { + margin-bottom: 100% !important; + border: 0; +} + +.pdfPresentationMode:fullscreen .pdfViewer .page { + margin-bottom: 100%; + border: 0; +} + * { padding: 0; margin: 0; } @@ -196,83 +223,93 @@ } [hidden] { display: none !important; } -#viewerContainer:-webkit-full-screen { +#viewerContainer.pdfPresentationMode:-webkit-full-screen { top: 0px; border-top: 2px solid transparent; background-color: #000; width: 100%; height: 100%; overflow: hidden; cursor: none; + -webkit-user-select: none; } -#viewerContainer:-moz-full-screen { +#viewerContainer.pdfPresentationMode:-moz-full-screen { top: 0px; border-top: 2px solid transparent; background-color: #000; width: 100%; height: 100%; overflow: hidden; cursor: none; + -moz-user-select: none; } -#viewerContainer:-ms-fullscreen { +#viewerContainer.pdfPresentationMode:-ms-fullscreen { top: 0px !important; border-top: 2px solid transparent; width: 100%; height: 100%; overflow: hidden !important; cursor: none; + -ms-user-select: none; } -#viewerContainer:-ms-fullscreen::-ms-backdrop { +#viewerContainer.pdfPresentationMode:-ms-fullscreen::-ms-backdrop { background-color: #000; } -#viewerContainer:fullscreen { +#viewerContainer.pdfPresentationMode:fullscreen { top: 0px; border-top: 2px solid transparent; background-color: #000; width: 100%; height: 100%; overflow: hidden; cursor: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; } -:-webkit-full-screen a:not(.internalLink) { +.pdfPresentationMode:-webkit-full-screen a:not(.internalLink) { display: none; } -:-moz-full-screen a:not(.internalLink) { +.pdfPresentationMode:-moz-full-screen a:not(.internalLink) { display: none; } -:-ms-fullscreen a:not(.internalLink) { +.pdfPresentationMode:-ms-fullscreen a:not(.internalLink) { display: none !important; } -:fullscreen a:not(.internalLink) { +.pdfPresentationMode:fullscreen a:not(.internalLink) { display: none; } -:-webkit-full-screen .textLayer > div { +.pdfPresentationMode:-webkit-full-screen .textLayer > div { cursor: none; } -:-moz-full-screen .textLayer > div { +.pdfPresentationMode:-moz-full-screen .textLayer > div { cursor: none; } -:fullscreen .textLayer > div { +.pdfPresentationMode:-ms-fullscreen .textLayer > div { cursor: none; } -#viewerContainer.presentationControls, -#viewerContainer.presentationControls .textLayer > div { +.pdfPresentationMode:fullscreen .textLayer > div { + cursor: none; +} + +.pdfPresentationMode.pdfPresentationModeControls > *, +.pdfPresentationMode.pdfPresentationModeControls .textLayer > div { cursor: default; } /* outer/inner center provides horizontal center */ .outerCenter { @@ -475,40 +512,39 @@ -webkit-transition: width 200ms; transition: width 200ms; } @-webkit-keyframes progressIndeterminate { - 0% { left: 0%; } - 50% { left: 100%; } - 100% { left: 100%; } + 0% { left: -142px; } + 100% { left: 0; } } @keyframes progressIndeterminate { - 0% { left: 0%; } - 50% { left: 100%; } - 100% { left: 100%; } + 0% { left: -142px; } + 100% { left: 0; } } #loadingBar .progress.indeterminate { background-color: #999; -webkit-transition: none; transition: none; } -#loadingBar .indeterminate .glimmer { +#loadingBar .progress.indeterminate .glimmer { position: absolute; top: 0; left: 0; height: 100%; - width: 50px; + width: calc(100% + 150px); - background-image: linear-gradient(to right, #999 0%, #fff 50%, #999 100%); - background-size: 100% 100%; - background-repeat: no-repeat; + background: repeating-linear-gradient(135deg, + #bbb 0, #999 5px, + #999 45px, #ddd 55px, + #ddd 95px, #bbb 100px); - -webkit-animation: progressIndeterminate 2s linear infinite; - animation: progressIndeterminate 2s linear infinite; + -webkit-animation: progressIndeterminate 950ms linear infinite; + animation: progressIndeterminate 950ms linear infinite; } .findbar, .secondaryToolbar { top: 32px; position: absolute; @@ -616,17 +652,24 @@ html[dir='ltr'] .doorHangerRight:before { right: 13px; margin-right: -9px; } +#findResultsCount { + background-color: hsl(0, 0%, 85%); + color: hsl(0, 0%, 32%); + text-align: center; + padding: 3px 4px; +} + #findMsg { font-style: italic; color: #A6B7D0; } -.notFound { - background-color: rgb(255, 137, 153); +#findInput.notFound { + background-color: rgb(255, 102, 102); } html[dir='ltr'] #toolbarViewerLeft { margin-left: -1px; } @@ -730,10 +773,11 @@ } .splitToolbarButton > .toolbarButton:hover, .splitToolbarButton > .toolbarButton:focus, .dropdownToolbarButton:hover, .overlayButton:hover, +.overlayButton:focus, .toolbarButton.textButton:hover, .toolbarButton.textButton:focus { background-color: hsla(0,0%,0%,.2); box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset, 0 0 1px hsla(0,0%,100%,.15) inset, @@ -886,11 +930,11 @@ } .dropdownToolbarButton { width: 120px; max-width: 120px; - padding: 3px 2px 2px; + padding: 0; overflow: hidden; background: url(/pdfjs/web/images/toolbarButton-menuArrows.png) no-repeat; } html[dir='ltr'] .dropdownToolbarButton { background-position: 95%; @@ -898,17 +942,15 @@ html[dir='rtl'] .dropdownToolbarButton { background-position: 5%; } .dropdownToolbarButton > select { - -webkit-appearance: none; - -moz-appearance: none; /* in the future this might matter, see bugzilla bug #649849 */ min-width: 140px; font-size: 12px; color: hsl(0,0%,95%); margin: 0; - padding: 0; + padding: 3px 2px 2px; border: none; background: rgba(0,0,0,0); /* Opera does not support 'transparent' <select> background */ } .dropdownToolbarButton > select > option { @@ -1258,27 +1300,31 @@ #thumbnailView > a:last-of-type > .thumbnail { margin-bottom: 10px; } +#thumbnailView > a:last-of-type > .thumbnail:not([data-loaded]) { + margin-bottom: 9px; +} + .thumbnail:not([data-loaded]) { border: 1px dashed rgba(255, 255, 255, 0.5); - margin-bottom: 10px; + margin: -1px -1px 4px -1px; } .thumbnailImage { - transition-duration: 150ms; border: 1px solid transparent; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3); opacity: 0.8; z-index: 99; + background-color: white; + background-clip: content-box; } .thumbnailSelectionRing { border-radius: 2px; padding: 7px; - transition-duration: 150ms; } a:focus > .thumbnail > .thumbnailSelectionRing > .thumbnailImage, .thumbnail:hover > .thumbnailSelectionRing > .thumbnailImage { opacity: .9; @@ -1327,23 +1373,27 @@ } #attachmentsView { padding: 3px 4px 0; } +html[dir='ltr'] .outlineWithDeepNesting > .outlineItem, html[dir='ltr'] .outlineItem > .outlineItems { margin-left: 20px; } +html[dir='rtl'] .outlineWithDeepNesting > .outlineItem, html[dir='rtl'] .outlineItem > .outlineItems { margin-right: 20px; } .outlineItem > a, .attachmentsItem > button { text-decoration: none; display: inline-block; min-width: 95%; + min-width: calc(100% - 4px); /* Subtract the right padding (left, in RTL mode) + of the container. */ height: auto; margin-bottom: 1px; border-radius: 2px; color: hsla(0,0%,100%,.8); font-size: 13px; @@ -1358,33 +1408,70 @@ cursor: pointer; width: 100%; } html[dir='ltr'] .outlineItem > a { - padding: 2px 0 5px 10px; + padding: 2px 0 5px 4px; } html[dir='ltr'] .attachmentsItem > button { padding: 2px 0 3px 7px; text-align: left; } html[dir='rtl'] .outlineItem > a { - padding: 2px 10px 5px 0; + padding: 2px 4px 5px 0; } html[dir='rtl'] .attachmentsItem > button { padding: 2px 7px 3px 0; text-align: right; } +.outlineItemToggler { + position: relative; + height: 0; + width: 0; + color: hsla(0,0%,100%,.5); +} +.outlineItemToggler::before { + content: url(/pdfjs/web/images/treeitem-expanded.png); + display: inline-block; + position: absolute; +} +html[dir='ltr'] .outlineItemToggler.outlineItemsHidden::before { + content: url(/pdfjs/web/images/treeitem-collapsed.png); +} +html[dir='rtl'] .outlineItemToggler.outlineItemsHidden::before { + content: url(/pdfjs/web/images/treeitem-collapsed-rtl.png); +} +.outlineItemToggler.outlineItemsHidden ~ .outlineItems { + display: none; +} +html[dir='ltr'] .outlineItemToggler { + float: left; +} +html[dir='rtl'] .outlineItemToggler { + float: right; +} +html[dir='ltr'] .outlineItemToggler::before { + right: 4px; +} +html[dir='rtl'] .outlineItemToggler::before { + left: 4px; +} + +.outlineItemToggler:hover, +.outlineItemToggler:hover + a, +.outlineItemToggler:hover ~ .outlineItems, .outlineItem > a:hover, .attachmentsItem > button:hover { background-color: hsla(0,0%,100%,.02); background-image: linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0)); background-clip: padding-box; box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset, 0 0 1px hsla(0,0%,100%,.2) inset, 0 0 1px hsla(0,0%,0%,.2); + border-radius: 2px; color: hsla(0,0%,100%,.9); } .outlineItem.selected { background-color: hsla(0,0%,100%,.08); @@ -1401,23 +1488,16 @@ color: hsla(0,0%,100%,.8); font-style: italic; cursor: default; } - /* TODO: file FF bug to support ::-moz-selection:window-inactive so we can override the opaque grey background when the window is inactive; see https://bugzilla.mozilla.org/show_bug.cgi?id=706209 */ ::selection { background: rgba(0,0,255,0.3); } ::-moz-selection { background: rgba(0,0,255,0.3); } -.textLayer ::selection { background: rgb(0,0,255); } -.textLayer ::-moz-selection { background: rgb(0,0,255); } -.textLayer { - opacity: 0.2; -} - #errorWrapper { background: none repeat scroll 0 0 #FF5555; color: white; left: 0; position: absolute; @@ -1500,14 +1580,10 @@ } .dialog .toolbarField { margin: 5px 0; } -.dialog .toolbarField:hover, -.dialog .toolbarField:focus { - border-color: hsla(0,0%,0%,.32) hsla(0,0%,0%,.38) hsla(0,0%,0%,.42); -} .dialog .separator { display: block; margin: 4px 0 4px 0; height: 1px; @@ -1519,10 +1595,14 @@ .dialog .buttonRow { text-align: center; vertical-align: middle; } +.dialog :link { + color: white; +} + #passwordOverlay > .dialog { text-align: center; } #passwordOverlay .toolbarField { width: 200px; @@ -1611,11 +1691,31 @@ } #PDFBug table { font-size: 10px; } -#viewer.textLayer-visible .textLayer > div, +#viewer.textLayer-visible .textLayer { + opacity: 1.0; +} + +#viewer.textLayer-visible .canvasWrapper { + background-color: rgb(128,255,128); +} + +#viewer.textLayer-visible .canvasWrapper canvas { + mix-blend-mode: screen; +} + +#viewer.textLayer-visible .textLayer > div { + background-color: rgba(255, 255, 0, 0.1); + color: black; + border: solid 1px rgba(255, 0, 0, 0.5); + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + #viewer.textLayer-hover .textLayer > div:hover { background-color: white; color: black; } @@ -1811,10 +1911,29 @@ } .secondaryToolbarButton.documentProperties::before { content: url(/pdfjs/web/images/secondaryToolbarButton-documentProperties@2x.png); } + + .outlineItemToggler::before { + -webkit-transform: scale(0.5); + transform: scale(0.5); + top: -1px; + content: url(/pdfjs/web/images/treeitem-expanded@2x.png); + } + html[dir='ltr'] .outlineItemToggler.outlineItemsHidden::before { + content: url(/pdfjs/web/images/treeitem-collapsed@2x.png); + } + html[dir='rtl'] .outlineItemToggler.outlineItemsHidden::before { + content: url(/pdfjs/web/images/treeitem-collapsed-rtl@2x.png); + } + html[dir='ltr'] .outlineItemToggler::before { + right: 0; + } + html[dir='rtl'] .outlineItemToggler::before { + left: 0; + } } @media print { /* General rules for printing. */ body { @@ -1857,13 +1976,17 @@ display: none; } body[data-mozPrintCallback] #printContainer { display: block; } - #printContainer canvas { + /* wrapper around (scaled) print canvas elements */ + #printContainer > div { position: relative; top: 0; left: 0; + overflow: hidden; + } + #printContainer canvas { display: block; } } .visibleLargeView,