insomnia/app/css/components/editor.scss

60 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;
display: flex;
flex: 1 1 100%;
.editor {
position: absolute;
width: 100%;
height: 100%;
2016-03-20 04:00:40 +00:00
box-sizing: border-box;
2016-03-16 23:34:25 +00:00
2016-04-06 04:21:42 +00:00
.CodeMirror {
position: absolute;
height: 100% !important;
widtH: 100%;
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-03-21 05:47:49 +00:00
2016-04-06 04:21:42 +00:00
.CodeMirror-linenumber, .CodeMirror-guttermarker-subtle {
color: #555555 !important;
}
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
padding-bottom: 150px;
}
.CodeMirror-placeholder {
color: $hl-xxl;
}
2016-03-23 18:34:39 +00:00
}
2016-03-24 05:26:04 +00:00
2016-04-06 04:21:42 +00:00
&.editor-wrapper--readonly .CodeMirror-cursors {
2016-03-24 05:26:04 +00:00
opacity: 0;
}
2016-03-16 23:34:25 +00:00
}