Debian Codegraph @

src/foliate-js/vendor/pdfjs/text_layer_builder.css

raw
1 /* Copyright 2014 Mozilla Foundation
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 .textLayer {
17 position: absolute;
18 text-align: initial;
19 inset: 0;
20 overflow: clip;
21 opacity: 1;
22 line-height: 1;
23 text-size-adjust: none;
24 forced-color-adjust: none;
25 transform-origin: 0 0;
26 caret-color: CanvasText;
27 z-index: 0;
28
29 &.highlighting {
30 touch-action: none;
31 }
32
33 :is(span, br) {
34 color: transparent;
35 position: absolute;
36 white-space: pre;
37 cursor: text;
38 transform-origin: 0% 0%;
39 }
40
41 > :not(.markedContent),
42 .markedContent span:not(.markedContent) {
43 z-index: 1;
44 }
45
46 /* Only necessary in Google Chrome, see issue 14205, and most unfortunately
47 * the problem doesn't show up in "text" reference tests. */
48 /*#if !MOZCENTRAL*/
49 span.markedContent {
50 top: 0;
51 height: 0;
52 }
53 /*#endif*/
54
55 span[role="img"] {
56 user-select: none;
57 cursor: default;
58 }
59
60 .highlight {
61 --highlight-bg-color: rgb(180 0 170 / 0.25);
62 --highlight-selected-bg-color: rgb(0 100 0 / 0.25);
63 --highlight-backdrop-filter: none;
64 --highlight-selected-backdrop-filter: none;
65
66 @media screen and (forced-colors: active) {
67 --highlight-bg-color: transparent;
68 --highlight-selected-bg-color: transparent;
69 --highlight-backdrop-filter: var(--hcm-highlight-filter);
70 --highlight-selected-backdrop-filter: var(
71 --hcm-highlight-selected-filter
72 );
73 }
74
75 margin: -1px;
76 padding: 1px;
77 background-color: var(--highlight-bg-color);
78 backdrop-filter: var(--highlight-backdrop-filter);
79 border-radius: 4px;
80
81 &.appended {
82 position: initial;
83 }
84
85 &.begin {
86 border-radius: 4px 0 0 4px;
87 }
88
89 &.end {
90 border-radius: 0 4px 4px 0;
91 }
92
93 &.middle {
94 border-radius: 0;
95 }
96
97 &.selected {
98 background-color: var(--highlight-selected-bg-color);
99 backdrop-filter: var(--highlight-selected-backdrop-filter);
100 }
101 }
102
103 ::selection {
104 /* stylelint-disable declaration-block-no-duplicate-properties */
105 /*#if !MOZCENTRAL*/
106 background: rgba(0 0 255 / 0.25);
107 /*#endif*/
108 /* stylelint-enable declaration-block-no-duplicate-properties */
109 background: color-mix(in srgb, AccentColor, transparent 75%);
110 }
111
112 /* Avoids https://github.com/mozilla/pdf.js/issues/13840 in Chrome */
113 /*#if !MOZCENTRAL*/
114 br::selection {
115 background: transparent;
116 }
117 /*#endif*/
118
119 .endOfContent {
120 display: block;
121 position: absolute;
122 inset: 100% 0 0;
123 z-index: 0;
124 cursor: default;
125 user-select: none;
126 }
127
128 &.selecting .endOfContent {
129 top: 0;
130 }
131 }