text_layer_builder.css 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. }