pgadmin4/web/pgadmin/static/scss/_codemirror.overrides.scss
Aditya Toshniwal b5b9ee46a1 1) Port query tool to React. Fixes #6131
2) Added status bar to the Query Tool. Fixes #3253
3) Ensure that row numbers should be visible in view when scrolling horizontally. Fixes #3989
4) Allow removing a single query history. Refs #4113
5) Partially fixed Macros usability issues. Ref #6969
6) Fixed an issue where the Query tool opens on minimum size if the user opens multiple query tool Window quickly. Fixes #6725
7) Relocate GIS Viewer Button to the Left Side of the Results Table. Fixes #6830
8) Fixed an issue where the connection bar is not visible. Fixes #7188
9) Fixed an issue where an Empty message popup after running a query. Fixes #7260
10) Ensure that Autocomplete should work after changing the connection. Fixes #7262
11) Fixed an issue where the copy and paste row does not work if the first column contains no data. Fixes #7294
2022-04-07 17:36:56 +05:30

216 lines
5.5 KiB
SCSS
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* To override inbuilt Green color for matchingbracket */
.cm-s-default .CodeMirror-matchingbracket {
color: $sql-bracket-match-fg !important;
background-color: $sql-bracket-match-bg !important;
}
.CodeMirror {
font-size: 1em;
font-family: monospace, monospace;
background-color: $color-editor-bg !important;
color: $color-editor-fg;
border-radius: inherit;
}
/* Ensure the codemirror editor displays full height gutters when resized */
.CodeMirror, .CodeMirror-gutter {
height: 100% !important;
min-height: 100% !important;
}
/*
* Remove border right from "CodeMirror-gutters"
* class because its height doesn't increase
* with every new line added, instead add border
* right to ".CodeMirror-linenumber" class which
* adds a new div for every new line added
*/
.sql_field_layout .CodeMirror-gutters {
border-right: none;
}
.sql_field_layout .CodeMirror-linenumber {
border-right: 1px solid $color-gray-lighter;
}
/* class to disable Codemirror editor */
.cm_disabled {
background: $input-disabled-bg;
}
/* make syntax-highlighting bold */
.cm-s-default {
& .cm-quote {color: #090;}
& .cm-keyword {color: $color-editor-keyword; font-weight: 600;}
& .cm-atom {color: $color-editor-fg;}
& .cm-number {color: $color-editor-number; font-weight: 600;}
& .cm-def {color: $color-editor-fg;}
& .cm-punctuation,
& .cm-property,
& .cm-operator { color: $color-editor-operator; }
& .cm-variable {color: $color-editor-variable; }
& .cm-variable-2,
& .cm-variable-3,
& .cm-type {color: $color-editor-variable-2;}
& .cm-comment {color: $color-editor-comment;}
& .cm-string {color: $color-editor-string;}
& .cm-string-2 {color: $color-editor-string;}
& .cm-meta {color: $color-editor-fg;}
& .cm-qualifier {color: $color-editor-fg;}
& .cm-builtin {color: $color-editor-builtin;}
& .cm-bracket {color: $color-editor-bracket;}
& .cm-tag {color: $color-editor-fg;}
& .cm-attribute {color: $color-editor-fg;}
& .cm-hr {color: $color-editor-fg;}
& .cm-link {color: $color-editor-fg;}
& :not(.cm-fat-cursor) .CodeMirror-cursor {
border-left: thin solid $color-editor-fg;
border-right: none;
width: 0;
}
}
/* Codemirror buttons */
.CodeMirror-dialog button {
font-family: $font-family-primary;
color: $color-primary-fg;
font-size: 70%;
background-image: -webkit-linear-gradient(top, $color-primary-light 0%, $color-primary 100%);
background-image: -o-linear-gradient(top, $color-primary-light 0%, $color-primary 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from($color-primary-light), to($color-primary));
background-image: linear-gradient(to bottom, $color-primary-light 0%, $color-primary 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$color-primary-light}', endColorstr='#{$color-primary}', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-color: $color-primary;
border-radius: 4px;
}
.CodeMirror-gutters {
z-index: 2;
background-color: $sql-gutters-bg;
border-right: none;
}
/* workaround for codemirrors 'readOnly' option which is set to true instead of 'noCursor' */
.hide-cursor-workaround .CodeMirror-cursors {
display: none;
}
.CodeMirror-linenumber {
color: $color-fg;
}
.debugger-container .breakpoints {
width: 0.9em;
}
.CodeMirror, .CodeMirror-gutters {
min-height: 100%;
}
.CodeMirror-foldgutter {
width: .9em;
}
.CodeMirror-foldgutter-open,
.CodeMirror-foldgutter-folded {
cursor: pointer;
}
.CodeMirror-foldgutter-open:after {
content: "\25BC";
font-weight: 900;
}
.CodeMirror-foldgutter-folded:after {
content: "\25B6";
font-weight: 900;
}
.CodeMirror-foldmarker {
color: $color-editor-foldmarker;
text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px;
font-family: $font-family-primary;
line-height: .3;
cursor: pointer;
}
.CodeMirror-hints {
position: absolute;
z-index: 10;
overflow: hidden;
list-style: none;
margin: 0;
padding: 0px;
-webkit-box-shadow: $dropdown-box-shadow;
-moz-box-shadow: $dropdown-box-shadow;
box-shadow: $dropdown-box-shadow;
border-radius: $border-radius;
border: $panel-border;
background: $sql-hint-bg;
font-size: 90%;
font-family: $font-family-editor !important;
max-height: 20em;
overflow-y: auto;
& li {
padding: 0.125rem;
border-radius: 0rem;
&.CodeMirror-hint-active {
background: $sql-hint-active-bg;
color: $sql-hint-active-fg;
}
& .sqleditor-hint {
padding-left: 20px;
}
}
}
.CodeMirror .CodeMirror-selected {
background: $sql-editor-selection-bg !important;
}
.CodeMirror-activeline-background {
background: $color-editor-activeline !important;
}
.CodeMirror-simplescroll-horizontal {
height: $scrollbar-width;
}
.CodeMirror-simplescroll-vertical {
width: $scrollbar-width;
}
.CodeMirror-scrollbar-filler, .CodeMirror-simplescroll-horizontal, .CodeMirror-simplescroll-vertical {
background-color: lighten($scrollbar-base-color, 15%);
}
.CodeMirror-simplescroll-horizontal, .CodeMirror-simplescroll-vertical {
& div {
border: 0.25rem solid transparent;
border-radius: $border-radius*2;
background-clip: content-box;
background-color: rgba($scrollbar-base-color, 0.7);
&:hover {
background-color: $scrollbar-base-color;
}
}
}
.bg-gray-lighter {
background-color: $sql-editor-disable-bg !important;
}