Commit 1ab20170 authored by Robert Knight's avatar Robert Knight

Remove obsolete style overrides for PDF.js text layer

These are no longer needed as the visual highlights in PDFs are now
created by SVG elements above the canvas, rather than by a background
color in PDF.js's text layer.

Removing these overrides fixes a cosmetic issue where overlapping text
boxes in the selection layer could create different shades of blue (or
whatever the selection color is) instead of blending into one, as shown
in https://github.com/hypothesis/private-issues/issues/108#issuecomment-1115392598.
parent f9bad362
@import '../variables';
// In order for our highlights to be visible we need to use solid colors.
#viewer.has-transparent-text-layer .textLayer {
opacity: 1;
::selection {
background: rgba(0, 0, 255, 0.2);
}
::-moz-selection {
background: rgba(0, 0, 255, 0.2);
}
}
// Hide annotation layer while selecting text. // Hide annotation layer while selecting text.
// See https://github.com/hypothesis/client/issues/1464 // See https://github.com/hypothesis/client/issues/1464
#viewer.is-selecting .annotationLayer { #viewer.is-selecting .annotationLayer {
display: none; display: none;
} }
// When using search funcionality of PDF.js the matches should highlight the content but not cover it. Fix for #648
.textLayer .highlight.selected {
background-color: rgba(0, 100, 0, 0.5);
}
// Override PDFjs base font-size of miniscule `10px` to reset REM size. // Override PDFjs base font-size of miniscule `10px` to reset REM size.
// This is necessary for styling components in shadow DOMs that rely on REM- // This is necessary for styling components in shadow DOMs that rely on REM-
// based scales. // based scales.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment