insomnia/app/css/components/editor.scss

58 lines
1.3 KiB
SCSS
Raw Normal View History

2016-03-16 23:34:25 +00:00
@import '../constants/colors';
2016-03-23 05:58:16 +00:00
@import '../constants/dimensions';
2016-03-16 23:34:25 +00:00
2016-04-06 04:21:42 +00:00
.editor-wrapper {
/**
* There is a huge hack here. In order to expand an element 100% inside flexbox
* you need to use a position: absolute hack like this...
*/
position: relative;
.editor {
2016-04-10 06:59:05 +00:00
box-sizing: border-box;
2016-04-06 04:21:42 +00:00
position: absolute;
2016-04-10 06:59:05 +00:00
height: 100% !important;
2016-04-06 04:21:42 +00:00
width: 100%;
2016-03-16 23:34:25 +00:00
2016-04-06 04:21:42 +00:00
.CodeMirror {
height: 100% !important;
2016-04-09 21:41:27 +00:00
width: 100%;
2016-04-06 04:21:42 +00:00
font-family: "Source Code Pro", monospace;
box-sizing: border-box;
font-size: $font-size-md;
padding-top: $padding-sm;
}
2016-03-16 23:34:25 +00:00
2016-04-06 04:21:42 +00:00
.CodeMirror,
.cm-s-seti.CodeMirror, // Hack because seti theme is dumb
.CodeMirror-gutters,
.CodeMirror-scrollbar-filler,
.CodeMirror-gutter-filler {
// Let the background behind show through
background-color: transparent !important;
2016-04-10 02:58:48 +00:00
border: 0;
2016-04-06 04:21:42 +00:00
}
2016-03-21 05:47:49 +00:00
2016-04-06 04:21:42 +00:00
.CodeMirror-linenumber, .CodeMirror-guttermarker-subtle {
2016-04-09 01:14:25 +00:00
color: $hl-xl !important;
2016-04-06 04:21:42 +00:00
}
2016-03-21 05:47:49 +00:00
2016-04-06 04:21:42 +00:00
.CodeMirror-scroll {
cursor: text; // Show text cursor everywhere (not just in .Codemirror-lines)
}
2016-03-23 18:34:39 +00:00
2016-04-06 04:21:42 +00:00
.CodeMirror-lines {
// Scroll past the end
2016-04-15 02:13:49 +00:00
//padding-bottom: 50px;
2016-04-06 04:21:42 +00:00
}
.CodeMirror-placeholder {
color: $hl-xxl;
}
2016-03-24 05:26:04 +00:00
2016-04-17 22:46:17 +00:00
&.editor--readonly .CodeMirror-cursors {
opacity: 0;
}
2016-03-24 05:26:04 +00:00
}
2016-03-16 23:34:25 +00:00
}