Enhance/pdf enhancements (#8616)

- Improve interactions about the popup modal from the PDF viewer toolbar
- Persist highlights data with multiple-lines text format (for friendly Git diff)
- Blink the text highlight when scrolling to position
- Open the PDF viewer in the system Window
This commit is contained in:
Charlie
2023-02-20 15:58:43 +08:00
committed by GitHub
parent fb02c557f2
commit 55b5149f4a
14 changed files with 483 additions and 231 deletions

View File

@@ -56,7 +56,7 @@ input::-webkit-inner-spin-button {
position: relative;
}
&-header {
&-header {
display: flex;
justify-content: flex-end;
position: absolute;
@@ -721,7 +721,7 @@ input::-webkit-inner-spin-button {
}
}
#pdf-layout-container {
.extensions__pdf-container {
background-color: transparent;
.extensions__pdf-toolbar .buttons {
@@ -980,6 +980,17 @@ body.is-pdf-active {
}
}
html.is-system-window {
.extensions__pdf-container {
width: 100vw;
height: 100vh;
}
.extensions__pdf-loader {
@apply w-full;
}
}
/* overrides for pdf_viewer.css from PDF.JS web viewer */
.textLayer {
@@ -1016,3 +1027,21 @@ body.is-pdf-active {
border: 2px dashed #ff3434;
}
}
.hl-flash {
animation-name: hl-flash;
animation-duration: 0.3s;
animation-timing-function: ease;
animation-iteration-count: 2;
animation-direction: alternate;
animation-play-state: running;
}
@keyframes hl-flash {
from {
opacity: 0;
}
to {
opacity: 1;
}
}