Skip to content

Commit

Permalink
Changed matching bracket highlight color (#1037)
Browse files Browse the repository at this point in the history
  • Loading branch information
cherylwu834 committed May 10, 2023
1 parent 230853f commit 17be7ac
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
10 changes: 10 additions & 0 deletions src/styles/CustomCM.scss
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,16 @@ taken from https://stackoverflow.com/questions/16348489/is-there-a-css-hack-for-
overflow: hidden !important;
}

/* highlights matching bracket when user clicks on one of the brackets */
.CodeMirror-matchingbracket {
text-decoration: none;

@include themify($themes) {
background-color: themed("highlightBracket");
color: themed('color');
}
}

/* most of the codemirror styles we can override for text
.cm-s-material .CodeMirror-activeline-background { background: rgba(0, 0, 0, 0); }
.cm-s-material .cm-operator { color: rgba(233, 237, 237, 1); }
Expand Down
5 changes: 1 addition & 4 deletions src/styles/Editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,7 @@
background-color: themed("backgroundColor");
}

.cm-s-material .CodeMirror-matchingbracket {
background-color: rgb(0 255 0 / 40%);
text-decoration: none;
}

}

.btn-language-dropdown {
Expand Down
2 changes: 2 additions & 0 deletions src/styles/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ $themes: (
property: #056d45,
cursor: #f4ee94,
selectedLine: $off-white,
highlightBracket: rgba(174, 214, 67, 0.4), //$teachla-green but with lower opacity
),
dark: (
// defaults
Expand All @@ -96,6 +97,7 @@ $themes: (
property: #80cbae,
cursor: #f4ee94,
selectedLine: rgba(255, 255, 255, 0.1),
highlightBracket: rgba(40, 170, 38, 0.4), //$teachla-secondary-2 but with lower opacity
),
);

Expand Down

0 comments on commit 17be7ac

Please sign in to comment.