filestash/client/pages/viewerpage/editor.scss
2018-05-01 01:01:37 +10:00

131 lines
2.8 KiB
SCSS

.component_editor{
width: 100%;
> div{
#editor{
height: 100%;
flex: 1;
display: flex;
overflow: hidden;
width: 100%;
}
}
}
.CodeMirror {
width: 100%;
height: 100%;
color: #3b4045;
background: var(--bg-color);
font-size: 16px;
font-family: 'Inconsolata', monospace;
}
.CodeMirror-sizer{
> div{
padding-top: 4px;
padding-bottom: 5px;
}
}
.CodeMirror-scroll { -webkit-overflow-scrolling: touch; }
.CodeMirror-foldmarker{
padding: 5px;
}
/* HIDE LINE NUMBERS ON MOBILE */
// this hack is important as we rely on the dom to provide code folding for org mode
@media screen and (max-width: 400px) {
.CodeMirror-sizer{ margin-left: 0!important; }
.CodeMirror-gutters{ display: none; }
.CodeMirror-gutter-wrapper{ display: none; }
}
/* SEARCH */
.CodeMirror-dialog {
position: fixed;
left: 0; right: 0;
background: #525659;
z-index: 15;
padding: 5px .8em;
overflow: hidden;
color: #e2e2e2;
box-shadow: 2px 2px 2px rgba(0,0,0,0.5)
}
.CodeMirror-dialog-top {
border-bottom: 1px solid #eee;
bottom: 0;
}
.CodeMirror-dialog-bottom {
border-top: 1px solid #eee;
bottom: 0;
}
.CodeMirror-dialog input {
border: none;
outline: none;
background: transparent;
width: 20em;
color: white;
font-family: monospace;
}
.CodeMirror-dialog button {
font-size: 70%;
}
/* Highlight Theme */
.cm-s-default .cm-header {
color: #3E7AA6;
font-size: 18px;
margin: 1px 0 1px 0;
display: inline-block;
font-kerning: normal;
line-height: 1em;
}
.cm-s-default .cm-keyword {color: #3E7AA6;}
.cm-s-default .cm-header.cm-org-level-star{
color: #6f6f6f;
vertical-align: text-bottom;
display: inline-block;
padding-left: 4px;
margin-left: -4px;
}
.cm-s-default .cm-header.cm-org-todo{color: #FF8355; font-weight: normal;}
.cm-s-default .cm-header.cm-org-done{color: #3BB27C; font-weight: normal;}
.cm-s-default .cm-void {
display: inline-block;
max-width: 20px;
overflow: hidden;
white-space: nowrap;
}
.cm-s-default .cm-header.cm-comment{font-weight: normal;}
.cm-s-default .cm-link{color: #555!important;}
.cm-s-default .cm-url{color: #555!important;}
.cm-s-default .cm-variable-3 {color: #085;}
.cm-s-default .cm-comment {color: #6f6f6f;}
.cm-s-default .cm-string, .cm-s-default .cm-string-2{ color: #c41a16; }
.cm-s-default .cm-def { color: rgb(68, 85, 136); }
.CodeMirror-gutters{
box-shadow: 0px 0px 2px rgba(0,0,0,0.1);
}
.CodeMirror-foldmarker{
padding-left: 5px;
color: var(--color);
text-shadow: 1px 1px 10px var(--color);
}
span.CodeMirror-matchingbracket {color: #0f0;}
span.CodeMirror-nonmatchingbracket {color: #f22;}
/* BUGFIX */
// https://github.com/codemirror/CodeMirror/issues/5056
.CodeMirror-cursor {
width: 1px !important;
}