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