pdf.js/web/viewer-geckoview.css

285 lines
5.4 KiB
CSS

/* Copyright 2014 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@import url(pdf_viewer.css);
:root {
--dir-factor: 1;
--scale-select-width: 140px;
--toolbar-icon-opacity: 1;
--doorhanger-icon-opacity: 0.9;
--main-color: rgba(12, 12, 13, 1);
--body-bg-color: rgba(212, 212, 215, 1);
--scrollbar-color: auto;
--scrollbar-bg-color: auto;
--dialog-button-border: none;
--dialog-button-bg-color: rgba(12, 12, 13, 0.1);
--dialog-button-hover-bg-color: rgba(12, 12, 13, 0.3);
--toolbar-bg-color: #f9f9fb;
--toolbar-divider-color: #e0e0e6;
--toolbar-fg-color: #15141a;
--toolbarButton-download-icon: url(images/gv-toolbarButton-download.svg);
}
:root:dir(rtl) {
--dir-factor: -1;
}
@media (prefers-color-scheme: dark) {
:root {
--main-color: rgba(249, 249, 250, 1);
--body-bg-color: rgba(42, 42, 46, 1);
--scrollbar-color: rgba(121, 121, 123, 1);
--scrollbar-bg-color: rgba(35, 35, 39, 1);
--dialog-button-bg-color: rgba(92, 92, 97, 1);
--dialog-button-hover-bg-color: rgba(115, 115, 115, 1);
--toolbar-bg-color: #2b2a33;
--toolbar-divider-color: #5b5b66;
--toolbar-fg-color: #fbfbfe;
}
}
@media screen and (forced-colors: active) {
:root {
--dialog-button-border: 1px solid Highlight;
--dialog-button-hover-bg-color: Highlight;
--dialog-button-hover-color: ButtonFace;
--main-color: CanvasText;
}
}
* {
padding: 0;
margin: 0;
}
html,
body {
height: 100%;
width: 100%;
}
body {
background-color: var(--body-bg-color);
scrollbar-color: var(--scrollbar-color) var(--scrollbar-bg-color);
}
.hidden,
[hidden] {
display: none !important;
}
#outerContainer {
width: 100%;
height: 100%;
position: relative;
}
#mainContainer {
position: absolute;
inset: 0;
min-width: 350px;
}
#viewerContainer {
overflow: auto;
position: absolute;
inset: 41px 0 0;
outline: none;
}
.dialogButton {
border: none;
background: none;
width: 28px;
height: 28px;
outline: none;
}
.dialogButton:is(:hover, :focus-visible) {
background-color: var(--dialog-button-hover-bg-color);
}
.dialogButton:is(:hover, :focus-visible) > span {
color: var(--dialog-button-hover-color);
}
.dialogButton[disabled] {
opacity: 0.5;
}
.dialogButton {
min-width: 16px;
margin: 2px 1px;
padding: 2px 6px 0;
border: none;
border-radius: 2px;
color: var(--main-color);
font-size: 12px;
line-height: 14px;
user-select: none;
cursor: default;
box-sizing: border-box;
}
.toolbarField {
padding: 4px 7px;
margin: 3px 0;
border-radius: 2px;
background-color: var(--field-bg-color);
background-clip: padding-box;
border: 1px solid var(--field-border-color);
box-shadow: none;
color: var(--field-color);
font-size: 12px;
line-height: 16px;
outline: none;
}
.toolbarField:focus {
border-color: #0a84ff;
}
#floatingToolbar {
display: flex;
align-items: center;
position: absolute;
width: 100%;
height: 40px;
top: 0;
left: 0;
box-sizing: content-box;
border-block-end: solid 1px var(--toolbar-divider-color);
background-color: var(--toolbar-bg-color);
}
#floatingToolbar.show {
z-index: 100000;
opacity: 1;
}
#floatingToolbar:not(show) {
z-index: -1;
opacity: 0;
}
.toolbarButton {
display: flex;
align-items: center;
border-style: none;
user-select: none;
box-sizing: border-box;
background-color: transparent;
width: auto;
height: auto;
outline: none;
position: relative;
}
.toolbarButton > span {
color: var(--toolbar-fg-color);
width: auto;
height: auto;
overflow: hidden;
}
:is(.toolbarButton .dialogButton)[disabled] {
opacity: 0.5;
}
.toolbarButton::before {
width: 24px;
height: 24px;
content: "";
background-color: var(--toolbar-fg-color);
mask-size: cover;
margin-inline: 12px 8px;
}
#download::before {
mask-image: var(--toolbarButton-download-icon);
}
.dialogButton {
width: auto;
margin: 3px 4px 2px !important;
padding: 2px 11px;
color: var(--main-color);
background-color: var(--dialog-button-bg-color);
border: var(--dialog-button-border) !important;
}
dialog {
margin: auto;
padding: 15px;
border-spacing: 4px;
color: var(--main-color);
font: message-box;
font-size: 12px;
line-height: 14px;
background-color: var(--doorhanger-bg-color);
border: 1px solid rgba(0, 0, 0, 0.5);
border-radius: 4px;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
dialog::backdrop {
background-color: rgba(0, 0, 0, 0.2);
}
dialog > .row {
display: table-row;
}
dialog > .row > * {
display: table-cell;
}
dialog .toolbarField {
margin: 5px 0;
}
dialog .separator {
display: block;
margin: 4px 0;
height: 1px;
width: 100%;
background-color: var(--separator-color);
}
dialog .buttonRow {
text-align: center;
vertical-align: middle;
}
dialog :link {
color: rgba(255, 255, 255, 1);
}
#passwordDialog {
text-align: center;
}
#passwordDialog .toolbarField {
width: 200px;
}
@page {
margin: 0;
}