|
| 1 | +.dxc-editor { |
| 2 | + border-radius: 8px; |
| 3 | + box-sizing: border-box; |
| 4 | + display: grid; |
| 5 | + font: 15px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; |
| 6 | + grid-template-columns: max-content minmax(0, 1fr); |
| 7 | + min-height: 0; |
| 8 | + overflow: auto; |
| 9 | + tab-size: 4; |
| 10 | +} |
| 11 | + |
| 12 | +.dxc-editor *, |
| 13 | +.dxc-editor *::before, |
| 14 | +.dxc-editor *::after { |
| 15 | + box-sizing: border-box; |
| 16 | +} |
| 17 | + |
| 18 | +.dxc-editor-viewport { |
| 19 | + min-height: 100%; |
| 20 | + min-width: 0; |
| 21 | + position: relative; |
| 22 | +} |
| 23 | + |
| 24 | +.dxc-editor-gutter, |
| 25 | +.dxc-editor-highlight, |
| 26 | +.dxc-editor-input { |
| 27 | + min-height: 100%; |
| 28 | +} |
| 29 | + |
| 30 | +.dxc-editor-highlight, |
| 31 | +.dxc-editor-input { |
| 32 | + padding: var(--dxc-editor-padding, 14px 18px 14px 0); |
| 33 | + white-space: pre; |
| 34 | +} |
| 35 | + |
| 36 | +.dxc-editor-gutter { |
| 37 | + color: var(--muted, currentColor); |
| 38 | + padding: var(--dxc-editor-gutter-padding, 14px 0); |
| 39 | + pointer-events: none; |
| 40 | + user-select: none; |
| 41 | +} |
| 42 | + |
| 43 | +.dxc-editor-highlight { |
| 44 | + pointer-events: none; |
| 45 | +} |
| 46 | + |
| 47 | +.dxc-editor-highlight span { |
| 48 | + font-style: normal !important; |
| 49 | + font-weight: inherit !important; |
| 50 | +} |
| 51 | + |
| 52 | +.dxc-editor-input { |
| 53 | + caret-color: var(--dxc-editor-caret, currentColor); |
| 54 | + color: transparent; |
| 55 | + inset: 0; |
| 56 | + outline: none; |
| 57 | + overflow-wrap: normal; |
| 58 | + position: absolute; |
| 59 | + z-index: 1; |
| 60 | +} |
| 61 | + |
| 62 | +.dxc-editor-input::selection { |
| 63 | + background: var(--dxc-editor-selection, rgba(122, 162, 247, 0.34)); |
| 64 | + color: transparent; |
| 65 | +} |
| 66 | + |
| 67 | +.dxc-editor-input:empty::before { |
| 68 | + color: var(--muted, currentColor); |
| 69 | + content: attr(data-placeholder); |
| 70 | + opacity: 0.72; |
| 71 | +} |
| 72 | + |
| 73 | +.dxc-editor:focus-within { |
| 74 | + box-shadow: var(--dxc-editor-focus-ring, 0 0 0 3px rgba(122, 162, 247, 0.22)); |
| 75 | +} |
| 76 | + |
| 77 | +.dxc-editor-line, |
| 78 | +.dxc-editor-gutter-line { |
| 79 | + min-height: 1.55em; |
| 80 | +} |
| 81 | + |
| 82 | +.dxc-editor-gutter-line { |
| 83 | + min-width: var(--dxc-editor-gutter-width, 4ch); |
| 84 | + padding: var(--dxc-editor-gutter-line-padding, 0 14px); |
| 85 | + text-align: right; |
| 86 | +} |
| 87 | + |
| 88 | +.dxc-editor-no-gutter { |
| 89 | + grid-template-columns: minmax(0, 1fr); |
| 90 | +} |
| 91 | + |
| 92 | +.dxc-editor-no-gutter .dxc-editor-highlight, |
| 93 | +.dxc-editor-no-gutter .dxc-editor-input { |
| 94 | + padding-left: var(--dxc-editor-padding-left, 18px); |
| 95 | +} |
0 commit comments