| 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 | .file-stack-editor, |
| b69ab31 | | | 9 | .file-unified-stack-editor { |
| b69ab31 | | | 10 | border: 1px solid var(--tooltip-border); |
| b69ab31 | | | 11 | width: fit-content; |
| b69ab31 | | | 12 | height: fit-content; |
| b69ab31 | | | 13 | } |
| b69ab31 | | | 14 | |
| b69ab31 | | | 15 | .file-stack-editor pre { |
| b69ab31 | | | 16 | padding: 0; |
| b69ab31 | | | 17 | margin: 0; |
| b69ab31 | | | 18 | /* Set line-height explicitly to avoid dynamic line heights based on (different) fonts decided by text content. */ |
| b69ab31 | | | 19 | line-height: 1.2; |
| b69ab31 | | | 20 | } |
| b69ab31 | | | 21 | |
| b69ab31 | | | 22 | .file-stack-editor .column-left-buttons, |
| b69ab31 | | | 23 | .file-stack-editor .column-right-buttons, |
| b69ab31 | | | 24 | .file-stack-editor .column-left-gutter, |
| b69ab31 | | | 25 | .file-stack-editor .column-right-gutter { |
| b69ab31 | | | 26 | background-color: rgba(128, 128, 128, 0.1); |
| b69ab31 | | | 27 | } |
| b69ab31 | | | 28 | |
| b69ab31 | | | 29 | .file-stack-editor .context-button, |
| b69ab31 | | | 30 | .file-unified-stack-editor .context-button { |
| b69ab31 | | | 31 | background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 20'%3E%3Cpath d='M0 10 Q10 15 20 10 Q30 5 40 10' stroke='grey' fill='transparent' /%3E%3C/svg%3E"); |
| b69ab31 | | | 32 | background-repeat: repeat-x; |
| b69ab31 | | | 33 | user-select: none; |
| b69ab31 | | | 34 | cursor: pointer; |
| b69ab31 | | | 35 | } |
| b69ab31 | | | 36 | |
| b69ab31 | | | 37 | .file-stack-editor .lineno { |
| b69ab31 | | | 38 | padding-left: var(--halfpad); |
| b69ab31 | | | 39 | padding-right: var(--halfpad); |
| b69ab31 | | | 40 | text-align: right; |
| b69ab31 | | | 41 | user-select: none; |
| b69ab31 | | | 42 | min-width: 1.5rem; |
| b69ab31 | | | 43 | } |
| b69ab31 | | | 44 | |
| b69ab31 | | | 45 | .file-stack-editor .lineno.add { |
| b69ab31 | | | 46 | background: var(--diffEditor-insertedLineHighlightBackground); |
| b69ab31 | | | 47 | } |
| b69ab31 | | | 48 | |
| b69ab31 | | | 49 | .file-stack-editor .lineno.del { |
| b69ab31 | | | 50 | background: var(--diffEditor-removedLineHighlightBackground); |
| b69ab31 | | | 51 | } |
| b69ab31 | | | 52 | |
| b69ab31 | | | 53 | .file-stack-editor .lineno.change { |
| b69ab31 | | | 54 | background: var(--editor-changedHighlightBackground); |
| b69ab31 | | | 55 | } |
| b69ab31 | | | 56 | |
| b69ab31 | | | 57 | .file-stack-editor .main-content { |
| b69ab31 | | | 58 | min-width: 200px; |
| b69ab31 | | | 59 | position: relative; |
| b69ab31 | | | 60 | } |
| b69ab31 | | | 61 | |
| b69ab31 | | | 62 | .file-stack-editor .line { |
| b69ab31 | | | 63 | padding-left: var(--halfpad); |
| b69ab31 | | | 64 | } |
| b69ab31 | | | 65 | |
| b69ab31 | | | 66 | .file-stack-editor .selected .button { |
| b69ab31 | | | 67 | opacity: 0.8; |
| b69ab31 | | | 68 | } |
| b69ab31 | | | 69 | |
| b69ab31 | | | 70 | .file-stack-editor .button { |
| b69ab31 | | | 71 | user-select: none; |
| b69ab31 | | | 72 | cursor: pointer; |
| b69ab31 | | | 73 | opacity: 0.3; |
| b69ab31 | | | 74 | } |
| b69ab31 | | | 75 | |
| b69ab31 | | | 76 | .file-stack-editor .button:active { |
| b69ab31 | | | 77 | color: grey; |
| b69ab31 | | | 78 | opacity: 1; |
| b69ab31 | | | 79 | } |
| b69ab31 | | | 80 | |
| b69ab31 | | | 81 | .file-stack-editor .add { |
| b69ab31 | | | 82 | background: var(--diffEditor-insertedLineBackground); |
| b69ab31 | | | 83 | } |
| b69ab31 | | | 84 | |
| b69ab31 | | | 85 | .file-stack-editor .del { |
| b69ab31 | | | 86 | background: var(--diffEditor-removedLineBackground); |
| b69ab31 | | | 87 | } |
| b69ab31 | | | 88 | |
| b69ab31 | | | 89 | .file-stack-editor .line.change { |
| b69ab31 | | | 90 | background: var(--editor-changedBackground); |
| b69ab31 | | | 91 | } |
| b69ab31 | | | 92 | |
| b69ab31 | | | 93 | .file-stack-editor-row .filerev-title { |
| b69ab31 | | | 94 | padding-left: var(--pad); |
| b69ab31 | | | 95 | text-overflow: ellipsis; |
| b69ab31 | | | 96 | } |
| b69ab31 | | | 97 | |
| b69ab31 | | | 98 | .file-stack-editor-ribbon-no-clip { |
| b69ab31 | | | 99 | position: relative; |
| b69ab31 | | | 100 | margin: var(--pad); |
| b69ab31 | | | 101 | } |
| b69ab31 | | | 102 | |
| b69ab31 | | | 103 | .file-stack-editor-ribbon-no-clip .ribbon { |
| b69ab31 | | | 104 | position: absolute; |
| b69ab31 | | | 105 | stroke: none; |
| b69ab31 | | | 106 | fill: var(--editor-changedHighlightBackground); |
| b69ab31 | | | 107 | z-index: 1; |
| b69ab31 | | | 108 | } |
| b69ab31 | | | 109 | |
| b69ab31 | | | 110 | .file-stack-editor-ribbon-no-clip .ribbon.add { |
| b69ab31 | | | 111 | fill: var(--diffEditor-insertedLineHighlightBackground); |
| b69ab31 | | | 112 | } |
| b69ab31 | | | 113 | |
| b69ab31 | | | 114 | .file-stack-editor-ribbon-no-clip .ribbon.del { |
| b69ab31 | | | 115 | fill: var(--diffEditor-removedLineHighlightBackground); |
| b69ab31 | | | 116 | } |
| b69ab31 | | | 117 | |
| b69ab31 | | | 118 | .file-unified-stack-editor { |
| b69ab31 | | | 119 | background-color: var(--background); |
| b69ab31 | | | 120 | width: 100%; |
| b69ab31 | | | 121 | border-spacing: 0; |
| b69ab31 | | | 122 | } |
| b69ab31 | | | 123 | |
| b69ab31 | | | 124 | .file-unified-stack-editor thead { |
| b69ab31 | | | 125 | position: sticky; |
| b69ab31 | | | 126 | top: 0; |
| b69ab31 | | | 127 | background-color: var(--background); |
| b69ab31 | | | 128 | z-index: 1; |
| b69ab31 | | | 129 | user-select: none; |
| b69ab31 | | | 130 | } |
| b69ab31 | | | 131 | |
| b69ab31 | | | 132 | .file-unified-stack-editor th { |
| b69ab31 | | | 133 | font-weight: unset; |
| b69ab31 | | | 134 | } |
| b69ab31 | | | 135 | |
| b69ab31 | | | 136 | .file-unified-stack-editor tbody { |
| b69ab31 | | | 137 | font-family: var(--monospace-fontFamily); |
| b69ab31 | | | 138 | font-size: 13px; |
| b69ab31 | | | 139 | } |
| b69ab31 | | | 140 | |
| b69ab31 | | | 141 | .file-unified-stack-editor td { |
| b69ab31 | | | 142 | padding: 0; |
| b69ab31 | | | 143 | } |
| b69ab31 | | | 144 | |
| b69ab31 | | | 145 | .file-unified-stack-editor td:last-child, |
| b69ab31 | | | 146 | .file-unified-stack-editor th:last-child { |
| b69ab31 | | | 147 | width: 100%; |
| b69ab31 | | | 148 | } |
| b69ab31 | | | 149 | |
| b69ab31 | | | 150 | .file-unified-stack-editor .color1 { |
| b69ab31 | | | 151 | background-color: rgba(128, 128, 160, 0.08); |
| b69ab31 | | | 152 | } |
| b69ab31 | | | 153 | .file-unified-stack-editor .color2 { |
| b69ab31 | | | 154 | background-color: rgba(128, 128, 160, 0.15); |
| b69ab31 | | | 155 | } |
| b69ab31 | | | 156 | .file-unified-stack-editor .color3 { |
| b69ab31 | | | 157 | background-color: rgba(128, 128, 160, 0.08); |
| b69ab31 | | | 158 | } |
| b69ab31 | | | 159 | .file-unified-stack-editor .color0 { |
| b69ab31 | | | 160 | background-color: rgba(128, 128, 160, 0.15); |
| b69ab31 | | | 161 | } |
| b69ab31 | | | 162 | |
| b69ab31 | | | 163 | .file-unified-stack-editor .checkbox { |
| b69ab31 | | | 164 | user-select: none; |
| b69ab31 | | | 165 | padding-left: var(--halfpad); |
| b69ab31 | | | 166 | padding-right: var(--halfpad); |
| b69ab31 | | | 167 | } |
| b69ab31 | | | 168 | |
| b69ab31 | | | 169 | .file-unified-stack-editor .checkbox.mutable { |
| b69ab31 | | | 170 | cursor: pointer; |
| b69ab31 | | | 171 | } |
| b69ab31 | | | 172 | |
| b69ab31 | | | 173 | .file-unified-stack-editor .checkbox.mutable.add { |
| b69ab31 | | | 174 | background-color: var(--diffEditor-insertedLineHighlightBackground); |
| b69ab31 | | | 175 | } |
| b69ab31 | | | 176 | |
| b69ab31 | | | 177 | .file-unified-stack-editor .checkbox.mutable.del { |
| b69ab31 | | | 178 | background-color: var(--diffEditor-removedLineHighlightBackground); |
| b69ab31 | | | 179 | } |
| b69ab31 | | | 180 | |
| b69ab31 | | | 181 | .file-unified-stack-editor td.line.del { |
| b69ab31 | | | 182 | background: var(--diffEditor-removedLineBackground); |
| b69ab31 | | | 183 | } |
| b69ab31 | | | 184 | |
| b69ab31 | | | 185 | .file-unified-stack-editor td.line.change { |
| b69ab31 | | | 186 | background: var(--editor-changedBackground); |
| b69ab31 | | | 187 | } |
| b69ab31 | | | 188 | |
| b69ab31 | | | 189 | .file-unified-stack-editor span.line { |
| b69ab31 | | | 190 | padding-left: var(--pad); |
| b69ab31 | | | 191 | white-space: pre; |
| b69ab31 | | | 192 | } |
| b69ab31 | | | 193 | |
| b69ab31 | | | 194 | .file-unified-stack-editor .context-button > span { |
| b69ab31 | | | 195 | display: block; |
| b69ab31 | | | 196 | height: 1em; |
| b69ab31 | | | 197 | } |