2014-10-01 00:48:29 +09:00
|
|
|
/* 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.
|
|
|
|
*/
|
|
|
|
|
2023-01-18 18:42:22 +09:00
|
|
|
:root {
|
|
|
|
--highlight-bg-color: rgba(180, 0, 170, 1);
|
|
|
|
--highlight-selected-bg-color: rgba(0, 100, 0, 1);
|
|
|
|
}
|
|
|
|
|
2023-01-18 18:49:52 +09:00
|
|
|
@media screen and (forced-colors: active) {
|
2023-01-18 18:42:22 +09:00
|
|
|
:root {
|
|
|
|
--highlight-bg-color: Highlight;
|
|
|
|
--highlight-selected-bg-color: ButtonText;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-10-01 00:48:29 +09:00
|
|
|
.textLayer {
|
|
|
|
position: absolute;
|
2021-06-22 01:53:25 +09:00
|
|
|
text-align: initial;
|
2023-03-19 22:30:42 +09:00
|
|
|
inset: 0;
|
2014-10-01 00:48:29 +09:00
|
|
|
overflow: hidden;
|
2022-09-20 02:23:17 +09:00
|
|
|
opacity: 0.25;
|
2020-08-30 23:24:55 +09:00
|
|
|
line-height: 1;
|
2021-11-06 19:39:43 +09:00
|
|
|
text-size-adjust: none;
|
2022-03-24 22:13:57 +09:00
|
|
|
forced-color-adjust: none;
|
2022-11-22 01:15:39 +09:00
|
|
|
transform-origin: 0 0;
|
2022-12-23 05:55:25 +09:00
|
|
|
z-index: 2;
|
2014-10-01 00:48:29 +09:00
|
|
|
}
|
|
|
|
|
2021-05-02 22:19:44 +09:00
|
|
|
.textLayer span,
|
|
|
|
.textLayer br {
|
2014-10-01 00:48:29 +09:00
|
|
|
color: transparent;
|
|
|
|
position: absolute;
|
|
|
|
white-space: pre;
|
|
|
|
cursor: text;
|
|
|
|
transform-origin: 0% 0%;
|
|
|
|
}
|
|
|
|
|
2021-10-29 21:32:13 +09:00
|
|
|
/* Only necessary in Google Chrome, see issue 14205, and most unfortunately
|
|
|
|
* the problem doesn't show up in "text" reference tests. */
|
|
|
|
.textLayer span.markedContent {
|
|
|
|
top: 0;
|
|
|
|
height: 0;
|
|
|
|
}
|
|
|
|
|
2014-10-01 00:48:29 +09:00
|
|
|
.textLayer .highlight {
|
|
|
|
margin: -1px;
|
|
|
|
padding: 1px;
|
2023-01-18 18:42:22 +09:00
|
|
|
background-color: var(--highlight-bg-color);
|
2014-10-01 00:48:29 +09:00
|
|
|
border-radius: 4px;
|
|
|
|
}
|
|
|
|
|
2021-06-02 07:25:40 +09:00
|
|
|
.textLayer .highlight.appended {
|
|
|
|
position: initial;
|
|
|
|
}
|
|
|
|
|
2014-10-01 00:48:29 +09:00
|
|
|
.textLayer .highlight.begin {
|
2021-01-10 22:02:38 +09:00
|
|
|
border-radius: 4px 0 0 4px;
|
2014-10-01 00:48:29 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
.textLayer .highlight.end {
|
2021-01-10 22:02:38 +09:00
|
|
|
border-radius: 0 4px 4px 0;
|
2014-10-01 00:48:29 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
.textLayer .highlight.middle {
|
2021-01-10 22:02:38 +09:00
|
|
|
border-radius: 0;
|
2014-10-01 00:48:29 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
.textLayer .highlight.selected {
|
2023-01-18 18:42:22 +09:00
|
|
|
background-color: var(--highlight-selected-bg-color);
|
2023-01-13 06:56:34 +09:00
|
|
|
}
|
|
|
|
|
2019-12-25 22:19:09 +09:00
|
|
|
.textLayer ::selection {
|
2022-09-20 02:23:17 +09:00
|
|
|
/*#if !MOZCENTRAL*/
|
|
|
|
background: blue;
|
|
|
|
/*#endif*/
|
|
|
|
background: AccentColor;
|
2019-12-25 22:19:09 +09:00
|
|
|
}
|
2015-11-04 05:20:34 +09:00
|
|
|
|
2021-08-02 02:42:05 +09:00
|
|
|
/* Avoids https://github.com/mozilla/pdf.js/issues/13840 in Chrome */
|
|
|
|
.textLayer br::selection {
|
|
|
|
background: transparent;
|
|
|
|
}
|
|
|
|
|
2015-11-04 05:20:34 +09:00
|
|
|
.textLayer .endOfContent {
|
|
|
|
display: block;
|
|
|
|
position: absolute;
|
2023-03-19 22:30:42 +09:00
|
|
|
inset: 100% 0 0;
|
2015-11-04 05:20:34 +09:00
|
|
|
z-index: -1;
|
|
|
|
cursor: default;
|
2018-04-04 07:18:57 +09:00
|
|
|
user-select: none;
|
2015-11-04 05:20:34 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
.textLayer .endOfContent.active {
|
2021-01-10 22:02:38 +09:00
|
|
|
top: 0;
|
2015-11-04 05:20:34 +09:00
|
|
|
}
|