mirror of
https://github.com/silvanocerza/github-gitless-sync.git
synced 2026-07-22 12:10:28 +00:00
Move diff highlight for split view in editor theme
This commit is contained in:
parent
928ad73696
commit
42c15f4479
2 changed files with 9 additions and 15 deletions
|
|
@ -4,21 +4,6 @@ import EditorPane from "./editor-pane";
|
|||
import ActionsGutter from "./actions-gutter";
|
||||
import * as React from "react";
|
||||
|
||||
// Add styles for diff highlighting
|
||||
const styles = document.createElement("style");
|
||||
styles.innerHTML = `
|
||||
.diff-modify-background {
|
||||
background-color: rgba(var(--color-yellow-rgb), 0.1);
|
||||
}
|
||||
.diff-add-background {
|
||||
background-color: rgba(var(--color-green-rgb), 0.1);
|
||||
}
|
||||
.diff-remove-background {
|
||||
background-color: rgba(var(--color-red-rgb), 0.1);
|
||||
}
|
||||
`;
|
||||
document.head.appendChild(styles);
|
||||
|
||||
interface DiffViewProps {
|
||||
remoteText: string;
|
||||
localText: string;
|
||||
|
|
|
|||
|
|
@ -50,6 +50,15 @@ const EditorPane: React.FC<EditorPaneProps> = (props) => {
|
|||
"&.cm-focused .cm-cursor": {
|
||||
borderLeftColor: "var(--text-normal)",
|
||||
},
|
||||
".diff-modify-background": {
|
||||
backgroundColor: "rgba(var(--color-yellow-rgb), 0.1)",
|
||||
},
|
||||
".diff-add-background": {
|
||||
backgroundColor: "rgba(var(--color-green-rgb), 0.1)",
|
||||
},
|
||||
".diff-remove-background": {
|
||||
backgroundColor: "rgba(var(--color-red-rgb), 0.1)",
|
||||
},
|
||||
}),
|
||||
markdown(),
|
||||
EditorView.domEventObservers({
|
||||
|
|
|
|||
Loading…
Reference in a new issue