text_layer_builder.css 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. left: 0;
  18. top: 0;
  19. right: 0;
  20. bottom: 0;
  21. overflow: hidden;
  22. opacity: 0.2;
  23. line-height: 1.0;
  24. }
  25. .textLayer > span {
  26. color: transparent;
  27. position: absolute;
  28. white-space: pre;
  29. cursor: text;
  30. transform-origin: 0% 0%;
  31. }
  32. .textLayer .highlight {
  33. margin: -1px;
  34. padding: 1px;
  35. background-color: rgb(180, 0, 170);
  36. border-radius: 4px;
  37. }
  38. .textLayer .highlight.begin {
  39. border-radius: 4px 0px 0px 4px;
  40. }
  41. .textLayer .highlight.end {
  42. border-radius: 0px 4px 4px 0px;
  43. }
  44. .textLayer .highlight.middle {
  45. border-radius: 0px;
  46. }
  47. .textLayer .highlight.selected {
  48. background-color: rgb(0, 100, 0);
  49. }
  50. .textLayer ::selection { background: rgb(0,0,255); }
  51. .textLayer .endOfContent {
  52. display: block;
  53. position: absolute;
  54. left: 0px;
  55. top: 100%;
  56. right: 0px;
  57. bottom: 0px;
  58. z-index: -1;
  59. cursor: default;
  60. user-select: none;
  61. }
  62. .textLayer .endOfContent.active {
  63. top: 0px;
  64. }
  65. #text-layer {
  66. position: absolute;
  67. left: 0;
  68. top: 0;
  69. right: 0;
  70. bottom: 0;
  71. overflow: hidden;
  72. opacity: 0.2;
  73. line-height: 1.0;
  74. }
  75. #text-layer > div {
  76. color: transparent;
  77. position: absolute;
  78. white-space: pre;
  79. cursor: text;
  80. transform-origin: 0% 0%;
  81. }