Fix CSS loader + Improve visual for code folding

This commit is contained in:
Zach Rispoli 2017-07-18 15:57:40 -04:00
parent 9647372c9e
commit 683b718303
4 changed files with 31 additions and 7 deletions

View file

@ -15,7 +15,6 @@ import 'codemirror/addon/fold/indent-fold';
import 'codemirror/addon/comment/comment';
import 'codemirror/keymap/sublime';
import 'codemirror/addon/search/jump-to-line';
import 'codemirror/addon/fold/foldgutter.css';
import { JSHINT } from 'jshint';
import { CSSLint } from 'csslint';
import { HTMLHint } from 'htmlhint';
@ -56,7 +55,8 @@ class Editor extends React.Component {
lineWrapping: false,
fixedGutter: false,
foldGutter: true,
gutters: [/* 'CodeMirror-lint-markers', 'CodeMirror-linenumbers', */'CodeMirror-foldgutter'],
foldOptions: { widget: '\u2026' },
gutters: ['CodeMirror-foldgutter'],
keyMap: 'sublime',
lint: {
onUpdateLinting: debounce((annotations) => {

View file

@ -336,3 +336,31 @@ div.CodeMirror-dragcursors {
/* Help users use markselection to safely style text background */
span.CodeMirror-selectedtext { background: none; }
/* CODE FOLDING (FOLDGUTTER.JS) */
.CodeMirror-foldmarker {
color: #FFF;
background-color: rgba(237, 34, 93, 0.42);
border-radius: 3px;
font-weight: bold;
font-family: arial;
line-height: .3;
cursor: pointer;
}
.CodeMirror-foldgutter {
width: 2.7em;
}
.CodeMirror-foldgutter-open,
.CodeMirror-foldgutter-folded {
cursor: pointer;
padding-bottom: 0.4em;
text-align: right;
line-height: 1.0;
}
.CodeMirror-foldgutter-open:after {
content: "\25BE";
}
.CodeMirror-foldgutter-folded:after {
content: "\25B8";
}

@ -1 +1 @@
Subproject commit 344fedf8d868c62adc571bf4212c6bea3cd20247
Subproject commit 0958be54482722821159cd3e07777988ee349f37

View file

@ -56,10 +56,6 @@ module.exports = {
test: /\.scss$/,
loaders: ['style', 'css', 'sass']
},
{
test: /\.css$/,
loader: "style-loader!css-loader"
},
{
test: /\.(svg|mp3)$/,
loader: 'file'