.codePreview { position: relative; padding-left: 50px !important; background-color: #2d2d2d; color: #f8f8f2; tab-size: 2; line-height: 1.4; border-radius: 4px; overflow: hidden; font-size: 12px; } .lineNumber { display: block; padding: 0 8px; text-align: right; color: #555; background: #1e1e1e; user-select: none; font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace; font-size: 11px; line-height: 1.4; min-height: 16.8px; /* 12px * 1.4 line-height */ border-right: 1px solid rgba(255, 255, 255, 0.1); opacity: 0.7; pointer-events: none; } .lineNumbersContainer { overflow: hidden; } .lineNumbersContainer .lineNumber { border-right: none; } .code { display: block; overflow-x: auto; } .languageBadge { position: absolute; top: 8px; right: 8px; font-size: 0.7em; background-color: rgba(0,0,0,0.7); color: #fff; padding: 2px 6px; border-radius: 4px; z-index: 100; } /* Стили для EditableCodePreview */ .editableCodeContainer { position: relative; background-color: #2d2d2d; border-radius: 6px; overflow: hidden; height: 100%; display: flex; flex-direction: column; } .editorControls { display: flex; justify-content: flex-end; padding: 8px 12px; background-color: #1e1e1e; border-top: 1px solid rgba(255, 255, 255, 0.1); border-bottom: none; order: 2; /* Перемещаем вниз */ } .editingControls { display: flex; gap: 8px; } .editButton { background: rgba(0, 122, 204, 0.8); color: white; border: none; padding: 6px 12px; border-radius: 4px; cursor: pointer; font-size: 12px; transition: background-color 0.2s; } .editButton:hover { background: rgba(0, 122, 204, 1); } .saveButton { background: rgba(40, 167, 69, 0.8); color: white; border: none; padding: 6px 12px; border-radius: 4px; cursor: pointer; font-size: 12px; transition: background-color 0.2s; } .saveButton:hover { background: rgba(40, 167, 69, 1); } .cancelButton { background: rgba(220, 53, 69, 0.8); color: white; border: none; padding: 6px 12px; border-radius: 4px; cursor: pointer; font-size: 12px; transition: background-color 0.2s; } .cancelButton:hover { background: rgba(220, 53, 69, 1); } .editorWrapper { position: relative; overflow: hidden; background-color: #2d2d2d; transition: border 0.2s; flex: 1; order: 1; /* Основной контент вверху */ } .syntaxHighlight { width: 100%; height: 100%; tab-size: 2; font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace; font-size: 12px; line-height: 1.4; } .editorArea { resize: none; border: none; width: 100%; height: 100%; tab-size: 2; font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace; font-size: 12px; line-height: 1.4; } .editorArea:focus { outline: none; } .placeholder { pointer-events: none; user-select: none; }