Skip to content

Commit

Permalink
[#66233] add active line indicator to the main CodeMirror component
Browse files Browse the repository at this point in the history
  • Loading branch information
Trzcin committed Sep 24, 2024
1 parent 52036c1 commit 777a7b0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/components/CodeMirror.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,24 @@ const CodeEditor = styled.div`
.cm-gutterElement span[title="Unfold line"] {
user-select: none;
}
.cm-line {
padding-left: 11px;
}
.cm-activeLine:not(.comment-wrapper *) {
position: relative;
&::before {
content: "";
display: block;
width: 5px;
height: 100%;
position: absolute;
background-color: var(--blue-200);
transform: translateX(-11px);
}
}
`;

const setEditorText = (editor, text) => {
Expand Down

0 comments on commit 777a7b0

Please sign in to comment.