insomnia/app/css/components/editor.scss

81 lines
1.6 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-05-01 19:56:30 +00:00
.editor {
box-sizing: border-box;
height: 100% !important;
width: 100%;
.CodeMirror {
2016-04-10 06:59:05 +00:00
height: 100% !important;
2016-04-06 04:21:42 +00:00
width: 100%;
2016-05-01 19:56:30 +00:00
font-family: monospace;
box-sizing: border-box;
padding-top: $padding-sm;
}
.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
2016-05-01 20:01:19 +00:00
background-color: $bg-super-dark !important;
2016-05-01 19:56:30 +00:00
border: 0;
}
.CodeMirror-linenumber, .CodeMirror-guttermarker-subtle {
color: $hl-xl !important;
}
.CodeMirror-scroll {
cursor: text; // Show text cursor everywhere (not just in .Codemirror-lines)
}
.CodeMirror-lines {
// Scroll past the end
//padding-bottom: 50px;
}
.CodeMirror-placeholder {
color: $hl-xxl;
}
2016-03-16 23:34:25 +00:00
2016-06-18 22:57:23 +00:00
.CodeMirror-lint-marker-error {
width: 100%;
height: 1em;
display: flex;
background: none;
text-align: center;
&::after {
2016-06-18 23:02:01 +00:00
color: darken($danger, 10);
text-align: center;
width: 100%;
content: '';
font-size: 0.7em;
2016-06-18 22:57:23 +00:00
}
}
2016-05-01 19:56:30 +00:00
&.editor--readonly .CodeMirror-cursors {
opacity: 0;
2016-03-24 05:26:04 +00:00
}
2016-03-16 23:34:25 +00:00
}
2016-06-18 22:57:23 +00:00
// This has to be outside because it's moved to the body element
.CodeMirror-lint-tooltip {
background-color: $bg-light;
color: $font-light-bg;
border-radius: 0;
font-size: $font-size-md;
padding: $padding-xs $padding-sm;
.CodeMirror-lint-message-error {
background-image: none;
padding-left: 0;
}
&::after {
display: none;
}
}