app/assets/stylesheets/pdfjs_viewer/pdfjs/viewer.css in pdfjs_viewer-rails-0.0.9 vs app/assets/stylesheets/pdfjs_viewer/pdfjs/viewer.css in pdfjs_viewer-rails-0.1.0

- old
+ new

@@ -84,60 +84,140 @@ .annotationLayer section { position: absolute; } -.annotationLayer .annotLink > a:hover { +.annotationLayer .linkAnnotation > a { + position: absolute; + font-size: 1em; + top: 0; + left: 0; + width: 100%; + height: 100%; +} + +.annotationLayer .linkAnnotation > a /* -ms-a */ { + background: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7") 0 0 repeat; +} + +.annotationLayer .linkAnnotation > a:hover { opacity: 0.2; background: #ff0; box-shadow: 0px 2px 10px #ff0; } -.annotationLayer .annotText > img { +.annotationLayer .textAnnotation img { position: absolute; cursor: pointer; } -.annotationLayer .annotTextContentWrapper { +.annotationLayer .textWidgetAnnotation input, +.annotationLayer .textWidgetAnnotation textarea, +.annotationLayer .choiceWidgetAnnotation select, +.annotationLayer .buttonWidgetAnnotation.checkBox input, +.annotationLayer .buttonWidgetAnnotation.radioButton input { + background-color: rgba(0, 54, 255, 0.13); + border: 1px solid transparent; + box-sizing: border-box; + font-size: 9px; + height: 100%; + padding: 0 3px; + vertical-align: top; + width: 100%; +} + +.annotationLayer .textWidgetAnnotation textarea { + font: message-box; + font-size: 9px; + resize: none; +} + +.annotationLayer .textWidgetAnnotation input[disabled], +.annotationLayer .textWidgetAnnotation textarea[disabled], +.annotationLayer .choiceWidgetAnnotation select[disabled], +.annotationLayer .buttonWidgetAnnotation.checkBox input[disabled], +.annotationLayer .buttonWidgetAnnotation.radioButton input[disabled] { + background: none; + border: 1px solid transparent; + cursor: not-allowed; +} + +.annotationLayer .textWidgetAnnotation input:hover, +.annotationLayer .textWidgetAnnotation textarea:hover, +.annotationLayer .choiceWidgetAnnotation select:hover, +.annotationLayer .buttonWidgetAnnotation.checkBox input:hover, +.annotationLayer .buttonWidgetAnnotation.radioButton input:hover { + border: 1px solid #000; +} + +.annotationLayer .textWidgetAnnotation input:focus, +.annotationLayer .textWidgetAnnotation textarea:focus, +.annotationLayer .choiceWidgetAnnotation select:focus { + background: none; + border: 1px solid transparent; +} + +.annotationLayer .textWidgetAnnotation input.comb { + font-family: monospace; + padding-left: 2px; + padding-right: 0; +} + +.annotationLayer .textWidgetAnnotation input.comb:focus { + /* + * Letter spacing is placed on the right side of each character. Hence, the + * letter spacing of the last character may be placed outside the visible + * area, causing horizontal scrolling. We avoid this by extending the width + * when the element has focus and revert this when it loses focus. + */ + width: 115%; +} + +.annotationLayer .buttonWidgetAnnotation.checkBox input, +.annotationLayer .buttonWidgetAnnotation.radioButton input { + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; +} + +.annotationLayer .popupWrapper { position: absolute; width: 20em; } -.annotationLayer .annotTextContent { +.annotationLayer .popup { + position: absolute; z-index: 200; - float: left; max-width: 20em; background-color: #FFFF99; box-shadow: 0px 2px 5px #333; border-radius: 2px; padding: 0.6em; + margin-left: 5px; cursor: pointer; + word-wrap: break-word; } -.annotationLayer .annotTextContent > h1 { +.annotationLayer .popup h1 { font-size: 1em; border-bottom: 1px solid #000000; padding-bottom: 0.2em; } -.annotationLayer .annotTextContent > p { +.annotationLayer .popup p { padding-top: 0.2em; } -.annotationLayer .annotLink > a { - position: absolute; - font-size: 1em; - top: 0; - left: 0; - width: 100%; - height: 100%; +.annotationLayer .highlightAnnotation, +.annotationLayer .underlineAnnotation, +.annotationLayer .squigglyAnnotation, +.annotationLayer .strikeoutAnnotation, +.annotationLayer .fileAttachmentAnnotation { + cursor: pointer; } -.annotationLayer .annotLink > a /* -ms-a */ { - background: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7") 0 0 repeat; -} - .pdfViewer .canvasWrapper { overflow: hidden; } .pdfViewer .page { @@ -156,10 +236,19 @@ .pdfViewer.removePageBorders .page { margin: 0px auto 10px auto; border: none; } +.pdfViewer.singlePageView { + display: inline-block; +} + +.pdfViewer.singlePageView .page { + margin: 0; + border: none; +} + .pdfViewer .page canvas { margin: 0; display: block; } @@ -198,16 +287,18 @@ margin: 0; } html { height: 100%; + width: 100%; /* Font size is needed to make the activity bar the correct size. */ font-size: 10px; } body { height: 100%; + width: 100%; background-color: #404040; background-image: url(/pdfjs/web/images/texture.png); } body, @@ -309,36 +400,10 @@ .pdfPresentationMode.pdfPresentationModeControls > *, .pdfPresentationMode.pdfPresentationModeControls .textLayer > div { cursor: default; } -/* outer/inner center provides horizontal center */ -.outerCenter { - pointer-events: none; - position: relative; -} -html[dir='ltr'] .outerCenter { - float: right; - right: 50%; -} -html[dir='rtl'] .outerCenter { - float: left; - left: 50%; -} -.innerCenter { - pointer-events: auto; - position: relative; -} -html[dir='ltr'] .innerCenter { - float: right; - right: -50%; -} -html[dir='rtl'] .innerCenter { - float: left; - left: -50%; -} - #outerContainer { width: 100%; height: 100%; position: relative; } @@ -668,28 +733,23 @@ #findInput.notFound { background-color: rgb(255, 102, 102); } -html[dir='ltr'] #toolbarViewerLeft { - margin-left: -1px; +#toolbarViewerMiddle { + position: absolute; + left: 50%; + transform: translateX(-50%); } -html[dir='rtl'] #toolbarViewerRight { - margin-right: -1px; -} html[dir='ltr'] #toolbarViewerLeft, html[dir='rtl'] #toolbarViewerRight { - position: absolute; - top: 0; - left: 0; + float: left; } html[dir='ltr'] #toolbarViewerRight, html[dir='rtl'] #toolbarViewerLeft { - position: absolute; - top: 0; - right: 0; + float: right; } html[dir='ltr'] #toolbarViewerLeft > *, html[dir='ltr'] #toolbarViewerMiddle > *, html[dir='ltr'] #toolbarViewerRight > *, html[dir='ltr'] .findbar > * { @@ -982,16 +1042,10 @@ width: 30px; display: inline-block; height: 1px; } -.toolbarButtonFlexibleSpacer { - -webkit-box-flex: 1; - -moz-box-flex: 1; - min-width: 30px; -} - html[dir='ltr'] #findPrevious { margin-left: 3px; } html[dir='ltr'] #findNext { margin-right: 3px; @@ -1723,21 +1777,21 @@ background-color: rgba(255,255,255, .6); color: black; } .grab-to-pan-grab { - cursor: url("images/grab.cur"), move !important; + cursor: url("/pdfjs/web/images/grab.cur"), move !important; cursor: -webkit-grab !important; cursor: -moz-grab !important; cursor: grab !important; } .grab-to-pan-grab *:not(input):not(textarea):not(button):not(select):not(:link) { cursor: inherit !important; } .grab-to-pan-grab:active, .grab-to-pan-grabbing { - cursor: url("images/grabbing.cur"), move !important; + cursor: url("/pdfjs/web/images/grabbing.cur"), move !important; cursor: -webkit-grabbing !important; cursor: -moz-grabbing !important; cursor: grabbing !important; position: fixed; @@ -1969,67 +2023,84 @@ .fileInput { display: none; } - /* Rules for browsers that support mozPrintCallback */ - body[data-mozPrintCallback] #outerContainer { + /* Rules for browsers that support PDF.js printing */ + body[data-pdfjsprinting] #outerContainer { display: none; } - body[data-mozPrintCallback] #printContainer { + body[data-pdfjsprinting] #printContainer { display: block; } + #printContainer { + height: 100%; + } /* wrapper around (scaled) print canvas elements */ #printContainer > div { position: relative; top: 0; left: 0; - overflow: hidden; + width: 1px; + height: 1px; + overflow: visible; + page-break-after: always; + page-break-inside: avoid; } - #printContainer canvas { + #printContainer canvas, + #printContainer img { display: block; } } .visibleLargeView, .visibleMediumView, .visibleSmallView { display: none; } -@media all and (max-width: 960px) { - html[dir='ltr'] #outerContainer.sidebarMoving .outerCenter, - html[dir='ltr'] #outerContainer.sidebarOpen .outerCenter { - float: left; - left: 205px; +@media all and (max-width: 1040px) { + #outerContainer.sidebarMoving #toolbarViewerMiddle, + #outerContainer.sidebarOpen #toolbarViewerMiddle { + display: table; + margin: auto; + left: auto; + position: inherit; + transform: none; } - html[dir='rtl'] #outerContainer.sidebarMoving .outerCenter, - html[dir='rtl'] #outerContainer.sidebarOpen .outerCenter { - float: right; - right: 205px; - } } -@media all and (max-width: 900px) { +@media all and (max-width: 980px) { + .sidebarMoving .hiddenLargeView, .sidebarOpen .hiddenLargeView { display: none; } + .sidebarMoving .visibleLargeView, .sidebarOpen .visibleLargeView { display: inherit; } } -@media all and (max-width: 860px) { +@media all and (max-width: 900px) { + #toolbarViewerMiddle { + display: table; + margin: auto; + left: auto; + position: inherit; + transform: none; + } + .sidebarMoving .hiddenMediumView, .sidebarOpen .hiddenMediumView { display: none; } + .sidebarMoving .visibleMediumView, .sidebarOpen .visibleMediumView { display: inherit; } } -@media all and (max-width: 770px) { +@media all and (max-width: 840px) { #sidebarContainer { top: 32px; z-index: 100; } .loadingInProgress #sidebarContainer { @@ -2045,69 +2116,50 @@ } html[dir='rtl'] #outerContainer.sidebarOpen > #mainContainer { right: 0px; } - html[dir='ltr'] .outerCenter { - float: left; - left: 205px; - } - html[dir='rtl'] .outerCenter { - float: right; - right: 205px; - } - #outerContainer .hiddenLargeView, #outerContainer .hiddenMediumView { display: inherit; } #outerContainer .visibleLargeView, #outerContainer .visibleMediumView { display: none; } } -@media all and (max-width: 700px) { +@media all and (max-width: 770px) { #outerContainer .hiddenLargeView { display: none; } #outerContainer .visibleLargeView { display: inherit; } } -@media all and (max-width: 660px) { +@media all and (max-width: 700px) { #outerContainer .hiddenMediumView { display: none; } #outerContainer .visibleMediumView { display: inherit; } } -@media all and (max-width: 600px) { +@media all and (max-width: 640px) { .hiddenSmallView { display: none; } .visibleSmallView { display: inherit; } - html[dir='ltr'] #outerContainer.sidebarMoving .outerCenter, - html[dir='ltr'] #outerContainer.sidebarOpen .outerCenter, - html[dir='ltr'] .outerCenter { - left: 156px; - } - html[dir='rtl'] #outerContainer.sidebarMoving .outerCenter, - html[dir='rtl'] #outerContainer.sidebarOpen .outerCenter, - html[dir='rtl'] .outerCenter { - right: 156px; - } .toolbarButtonSpacer { width: 0; } } -@media all and (max-width: 510px) { - #scaleSelectContainer, #pageNumberLabel { +@media all and (max-width: 535px) { + #scaleSelectContainer { display: none; } }