From 1bb0efdac87110dee0465e1160c900eb4877a3fb Mon Sep 17 00:00:00 2001 From: Zach Rispoli Date: Mon, 17 Jul 2017 16:13:59 -0400 Subject: [PATCH] Line error highlight styling --- client/modules/IDE/components/Editor.jsx | 2 ++ client/styles/components/_editor.scss | 25 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/client/modules/IDE/components/Editor.jsx b/client/modules/IDE/components/Editor.jsx index 0d365c97..82ca2200 100644 --- a/client/modules/IDE/components/Editor.jsx +++ b/client/modules/IDE/components/Editor.jsx @@ -118,6 +118,8 @@ class Editor extends React.Component { this._cm.getWrapperElement().style['font-size'] = `${this.props.fontSize}px`; this._cm.setOption('indentWithTabs', this.props.isTabIndent); this._cm.setOption('tabSize', this.props.indentationAmount); + + this._cm.addLineClass(1, null, 'line-runtime-error'); } componentWillUpdate(nextProps) { diff --git a/client/styles/components/_editor.scss b/client/styles/components/_editor.scss index 194264d0..780b19a2 100644 --- a/client/styles/components/_editor.scss +++ b/client/styles/components/_editor.scss @@ -27,6 +27,31 @@ padding-left: #{5 / $base-font-size}rem; } +.CodeMirror-activeline-background { + background-color: rgba(0,0,0,0.025) !important; +} + +.CodeMirror-linebackground { + +} + +.line-runtime-error { + background-color: #ffaaaa !important; + border-radius: 5px; +} + +.CodeMirror-guttermarker-subtle { + +} + +.CodeMirror-foldgutter-folded { + +} + +.CodeMirror-foldgutter-open { + +} + .CodeMirror-gutter-wrapper { right: 100%; top: 0;