| 1 | /** |
| 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. |
| 3 | * |
| 4 | * This source code is licensed under the MIT license found in the |
| 5 | * LICENSE file in the root directory of this source tree. |
| 6 | */ |
| 7 | |
| 8 | .text-editable-group { |
| 9 | position: relative; |
| 10 | } |
| 11 | |
| 12 | .text-editable-overlay { |
| 13 | position: absolute; |
| 14 | pointer-events: none; |
| 15 | } |
| 16 | |
| 17 | .text-editable-hidden-textarea { |
| 18 | overflow: hidden; |
| 19 | white-space: pre; |
| 20 | padding: 0; |
| 21 | margin: 0; |
| 22 | /* Comment out the following to make textarea visible to debug */ |
| 23 | position: absolute; |
| 24 | height: 0px; |
| 25 | width: 0px; |
| 26 | opacity: 0; |
| 27 | } |
| 28 | |
| 29 | .text-editable-hidden-textarea:active, |
| 30 | .text-editable-hidden-textarea:focus { |
| 31 | outline: none; |
| 32 | } |
| 33 | |
| 34 | .text-editable-container *::selection { |
| 35 | background: none; |
| 36 | } |
| 37 | |
| 38 | @keyframes blink { |
| 39 | 0%, |
| 40 | 49% { |
| 41 | opacity: 1; |
| 42 | } |
| 43 | |
| 44 | 50%, |
| 45 | 100% { |
| 46 | opacity: 0; |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | .text-editable-caret { |
| 51 | position: absolute; |
| 52 | width: 1px; |
| 53 | height: 0px; |
| 54 | background: var(--foreground); |
| 55 | transition: transform 0.06s ease-out; |
| 56 | animation: blink 1.2s steps(1) infinite; |
| 57 | } |
| 58 | |
| 59 | .text-editable-selection-highlight { |
| 60 | position: absolute; |
| 61 | opacity: 0.9; |
| 62 | mix-blend-mode: var(--selection-mix-mode); |
| 63 | } |
| 64 | |
| 65 | .text-editable-selection-highlight-line { |
| 66 | position: absolute; |
| 67 | background: var(--editor-selectionBackground); |
| 68 | transition: |
| 69 | left 0.06s ease-out, |
| 70 | width 0.06s ease-out; |
| 71 | } |
| 72 | |