mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 23:00:30 +00:00
3ced73f903
* Got 3 schemes * Finished color picke
283 lines
5.1 KiB
Plaintext
283 lines
5.1 KiB
Plaintext
@import '../constants/colors';
|
|
@import '../constants/dimensions';
|
|
@import '../constants/fonts';
|
|
|
|
.editor {
|
|
box-sizing: border-box;
|
|
height: 100% !important;
|
|
width: 100%;
|
|
display: grid;
|
|
grid-template-rows: minmax(0, 1fr) auto;
|
|
grid-template-columns: 100%;
|
|
|
|
.editor__container {
|
|
height: 100%;
|
|
width: 100%;
|
|
position: relative;
|
|
}
|
|
|
|
.CodeMirror {
|
|
position: absolute;
|
|
left: 0;
|
|
right: 0;
|
|
top: 0;
|
|
bottom: 0;
|
|
}
|
|
|
|
.editor__toolbar {
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
border-top: 1px solid @hl-md;
|
|
height: @line-height-xs;
|
|
|
|
input {
|
|
font-family: @font-monospace;
|
|
margin-right: 0;
|
|
width: 100%;
|
|
margin-left: @padding-md;
|
|
}
|
|
|
|
button {
|
|
color: @hl;
|
|
padding: @padding-xs @padding-md;
|
|
height: 100%;
|
|
}
|
|
}
|
|
|
|
.CodeMirror {
|
|
height: 100% !important;
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
padding-top: @padding-sm;
|
|
}
|
|
|
|
.CodeMirror * {
|
|
font-family: @font-monospace;
|
|
}
|
|
|
|
.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;
|
|
border: 0;
|
|
}
|
|
|
|
.CodeMirror-linenumber, .CodeMirror-guttermarker-subtle {
|
|
color: @hl-xl !important;
|
|
}
|
|
|
|
.CodeMirror-gutter {
|
|
background-color: @bg-super-dark;
|
|
}
|
|
|
|
&.editor--light-theme .CodeMirror-gutter {
|
|
background-color: @bg-super-light;
|
|
}
|
|
|
|
.CodeMirror-scroll {
|
|
cursor: text; // Show text cursor everywhere (not just in .Codemirror-lines)
|
|
}
|
|
|
|
.CodeMirror-lines {
|
|
// Scroll past the end
|
|
padding-bottom: 30px;
|
|
}
|
|
|
|
.CodeMirror-placeholder {
|
|
color: @hl-xxl;
|
|
}
|
|
|
|
.CodeMirror-lint-marker-error {
|
|
width: 100%;
|
|
height: 1em;
|
|
display: flex;
|
|
background: none;
|
|
text-align: center;
|
|
|
|
&::after {
|
|
color: @danger;
|
|
text-align: center;
|
|
width: 100%;
|
|
font-size: 0.7em; // because the circle is so large
|
|
content: '⬤';
|
|
}
|
|
}
|
|
|
|
&.editor--readonly .CodeMirror-cursors,
|
|
&.editor--readonly .CodeMirror-activeline-background {
|
|
opacity: 0;
|
|
}
|
|
}
|
|
|
|
// Search dialog (and others)
|
|
.CodeMirror-dialog {
|
|
background: @bg-super-dark;
|
|
}
|
|
|
|
// Tooltip for errors
|
|
.CodeMirror-lint-tooltip {
|
|
background-color: @bg-light;
|
|
color: @font-light-bg;
|
|
border-radius: 0;
|
|
font-size: @font-size-md;
|
|
padding: @padding-xs @padding-sm;
|
|
z-index: 99999;
|
|
|
|
.CodeMirror-lint-message-error {
|
|
background-image: none;
|
|
padding-left: 0;
|
|
}
|
|
&::after {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
/* Based on Sublime Text's Monokai theme */
|
|
.editor:not(.editor--light-theme) {
|
|
.cm-s-default.CodeMirror {
|
|
color: @font-super-dark-bg;
|
|
}
|
|
|
|
.cm-s-default div.CodeMirror-selected {
|
|
background: @hl-md;
|
|
border-radius: 2px;
|
|
}
|
|
|
|
.cm-s-default .CodeMirror-gutters {
|
|
border-right: 0;
|
|
}
|
|
|
|
.cm-s-default .CodeMirror-guttermarker {
|
|
color: @font-super-dark-bg;
|
|
}
|
|
|
|
.cm-s-default .CodeMirror-guttermarker-subtle {
|
|
color: @hl-lg;
|
|
}
|
|
|
|
.cm-s-default .CodeMirror-linenumber {
|
|
color: @hl;
|
|
}
|
|
|
|
.cm-s-default .CodeMirror-cursor {
|
|
border-left: 1px solid @font-super-dark-bg;
|
|
}
|
|
|
|
.cm-s-default span.cm-comment,
|
|
.cm-s-default span.cm-meta,
|
|
.cm-s-default span.cm-qualifier {
|
|
color: @font-super-dark-bg;
|
|
}
|
|
|
|
.cm-s-default span.cm-atom {
|
|
color: @surprise;
|
|
}
|
|
|
|
.cm-s-default span.cm-number {
|
|
color: @surprise;
|
|
}
|
|
|
|
.cm-s-default span.cm-keyword {
|
|
color: @danger;
|
|
}
|
|
|
|
.cm-s-default span.cm-builtin {
|
|
color: @info;
|
|
}
|
|
|
|
.cm-s-default span.cm-string {
|
|
color: @notice;
|
|
}
|
|
|
|
.cm-s-default span.cm-property, .cm-s-default span.cm-attribute {
|
|
color: @success;
|
|
}
|
|
|
|
.cm-s-default span.cm-variable {
|
|
color: @font-dark-bg;
|
|
}
|
|
|
|
.cm-s-default span.cm-variable-2 {
|
|
color: @info;
|
|
}
|
|
|
|
.cm-s-default span.cm-variable-3 {
|
|
color: @info;
|
|
}
|
|
|
|
.cm-s-default span.cm-def {
|
|
color: @warning;
|
|
}
|
|
|
|
.cm-s-default span.cm-bracket {
|
|
color: @font-dark-bg;
|
|
}
|
|
|
|
.cm-s-default span.cm-tag {
|
|
color: @danger;
|
|
}
|
|
|
|
.cm-s-default span.cm-header {
|
|
color: @surprise;
|
|
}
|
|
|
|
.cm-s-default span.cm-link {
|
|
color: @surprise;
|
|
}
|
|
|
|
.cm-s-default span.cm-error {
|
|
background: @danger;
|
|
color: #eee;
|
|
}
|
|
|
|
.cm-s-default .CodeMirror-activeline-background {
|
|
background: @hl-md;
|
|
}
|
|
|
|
.cm-s-default .CodeMirror-matchingbracket {
|
|
text-decoration: underline;
|
|
color: inherit !important;
|
|
}
|
|
}
|
|
|
|
.editor--light-theme {
|
|
.cm-s-default span {
|
|
color: @font-light-bg;
|
|
}
|
|
|
|
.cm-s-default span.cm-string {
|
|
color: @notice;
|
|
}
|
|
|
|
.cm-s-default span.cm-property, .cm-s-default span.cm-attribute {
|
|
color: @success;
|
|
}
|
|
|
|
.cm-s-default span.cm-atom,
|
|
.cm-s-default span.cm-number {
|
|
color: @surprise;
|
|
}
|
|
|
|
.cm-s-default .CodeMirror-activeline-background {
|
|
background: @hl-md;
|
|
}
|
|
|
|
.cm-s-default .CodeMirror-matchingbracket {
|
|
text-decoration: underline;
|
|
color: inherit !important;
|
|
}
|
|
|
|
.cm-s-default .CodeMirror-cursor {
|
|
border-left: 1px solid @font-super-light-bg;
|
|
}
|
|
|
|
.cm-s-default div.CodeMirror-selected {
|
|
background: @hl-md;
|
|
border-radius: 2px;
|
|
}
|
|
}
|