text_layer_builder.css 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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. .textLayer {
  16. position: absolute;
  17. text-align: initial;
  18. left: 0;
  19. top: 0;
  20. right: 0;
  21. bottom: 0;
  22. overflow: hidden;
  23. opacity: 0.25;
  24. line-height: 1;
  25. text-size-adjust: none;
  26. forced-color-adjust: none;
  27. transform-origin: 0 0;
  28. z-index: 2;
  29. }
  30. .textLayer span,
  31. .textLayer br {
  32. color: transparent;
  33. position: absolute;
  34. white-space: pre;
  35. cursor: text;
  36. transform-origin: 0% 0%;
  37. }
  38. /* Only necessary in Google Chrome, see issue 14205, and most unfortunately
  39. * the problem doesn't show up in "text" reference tests. */
  40. .textLayer span.markedContent {
  41. top: 0;
  42. height: 0;
  43. }
  44. .textLayer .highlight {
  45. margin: -1px;
  46. padding: 1px;
  47. background-color: rgba(180, 0, 170, 1);
  48. border-radius: 4px;
  49. }
  50. .textLayer .highlight.appended {
  51. position: initial;
  52. }
  53. .textLayer .highlight.begin {
  54. border-radius: 4px 0 0 4px;
  55. }
  56. .textLayer .highlight.end {
  57. border-radius: 0 4px 4px 0;
  58. }
  59. .textLayer .highlight.middle {
  60. border-radius: 0;
  61. }
  62. .textLayer .highlight.selected {
  63. background-color: rgba(0, 100, 0, 1);
  64. }
  65. .textLayer ::selection {
  66. /*#if !MOZCENTRAL*/
  67. background: blue;
  68. /*#endif*/
  69. background: AccentColor;
  70. }
  71. /* Avoids https://github.com/mozilla/pdf.js/issues/13840 in Chrome */
  72. .textLayer br::selection {
  73. background: transparent;
  74. }
  75. .textLayer .endOfContent {
  76. display: block;
  77. position: absolute;
  78. left: 0;
  79. top: 100%;
  80. right: 0;
  81. bottom: 0;
  82. z-index: -1;
  83. cursor: default;
  84. user-select: none;
  85. }
  86. .textLayer .endOfContent.active {
  87. top: 0;
  88. }