@lyra/vision
Version:
React-based data management tool for Lyra projects
681 lines (578 loc) • 12.6 kB
CSS
@import 'part:@lyra/base/theme/variables-style';
@keyframes blink {
50% {
background-color: transparent;
}
}
.root {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
overflow: hidden;
box-sizing: border-box;
display: flex;
flex-direction: column;
}
.header {
border-bottom: 1px solid #ccc;
padding: 1rem;
display: flex;
}
.splitContainer {
flex-grow: 1;
box-sizing: border-box;
position: relative;
}
.datasetSelectorContainer {
display: flex;
align-self: flex-start;
align-items: center;
}
.datasetLabel {
text-transform: uppercase;
margin-right: 0.5em;
}
.queryEditor {
height: 100%;
}
.paramsEditor {
height: 100%;
}
.queryTimingContainer {
flex-grow: 1;
text-align: right;
}
.headerFunctions {
align-self: flex-end;
}
.grid {
height: 100%;
}
.resultContainer {
position: absolute;
height: 100%;
width: 100%;
max-width: 100%;
overflow: hidden;
font-size: 0.8em;
}
.result {
position: relative;
height: 100%;
width: 100%;
overflow: scroll;
}
.edit {
box-sizing: border-box;
position: relative;
height: 100%;
width: 100%;
}
.datasetSelector {
composes: select from 'part:@lyra/components/selects/default-style';
min-width: 10rem;
}
.datasetSelectorLabel {
composes: level_2 from 'part:@lyra/components/labels/default-style';
margin-right: 20px;
}
.inputContainer {
width: 100%;
height: 100%;
position: relative;
overflow: hidden;
}
.inputLabelQuery {
position: absolute;
top: 40%;
left: 50%;
transform: translate(-50%, -50%);
font-weight: 100;
text-transform: uppercase;
font-size: 2em;
opacity: 0.2;
z-index: 10;
}
.inputLabelParams {
width: 30%;
}
.textarea {
composes: textarea from 'part:@lyra/components/textareas/default-style';
font-family: Consolas, monospace;
}
.queryEditor {
width: 100%;
box-sizing: border-box;
border-bottom: 1px solid #ccc;
}
.paramsEditor {
width: 100%;
}
.paramsEditorInvalid {
composes: paramsEditor;
background: color(var(--state-danger-color) a(20%));
width: 100%;
}
.controls {
margin: 10px 0;
}
.controls::after {
content: ' ';
display: block;
clear: both;
}
.queryTiming {
margin: 0;
padding: 0;
line-height: 3rem;
font-size: 0.8em;
color: #666;
}
.queryTimingLong {
composes: queryTiming;
color: var(--state-danger-color);
font-weight: bold;
}
.queryUrlContainer {
flex-grow: 1;
text-align: right;
}
.queryUrlContainer > span {
font-size: 0.8em;
}
.queryUrl {
composes: queryTiming;
margin-left: 5px;
font-size: 1em;
max-width: 50%;
max-height: 48px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
border: 0;
background-color: transparent;
}
/* BASICS */
.root :global(.CodeMirror) {
/* Set height, width, borders, and global font properties here */
font-family: monospace;
height: 100%;
color: black;
}
.root :global(.CodeMirror-hscrollbar) {
display: none;
}
/* PADDING */
.root :global(.CodeMirror-lines) {
padding: 4px 0; /* Vertical padding around content */
}
.root :global(.CodeMirror pre) {
padding: 0 4px; /* Horizontal padding of content */
}
.root :global(.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler) {
background-color: white; /* The little square between H and V scrollbars */
}
/* GUTTER */
.root :global(.CodeMirror-gutters) {
border-right: 1px solid #ddd;
background-color: #f7f7f7;
white-space: nowrap;
}
.root :global(.CodeMirror-linenumber) {
padding: 0 3px 0 5px;
min-width: 20px;
text-align: right;
color: #999;
white-space: nowrap;
}
.root :global(.CodeMirror-guttermarker) {
color: black;
}
.root :global(.CodeMirror-guttermarker-subtle) {
color: #999;
}
/* CURSOR */
.root :global(.CodeMirror-cursor) {
border-left: 1px solid black;
border-right: none;
width: 0;
}
/* Shown when moving in bi-directional text */
.root :global(.CodeMirror div.CodeMirror-secondarycursor) {
border-left: 1px solid silver;
}
.root :global(.cm-fat-cursor .CodeMirror-cursor) {
width: auto;
border: 0 ;
background: #7e7;
}
.root :global(.cm-fat-cursor div.CodeMirror-cursors) {
z-index: 1;
}
.root :global(.cm-animate-fat-cursor) {
width: auto;
border: 0;
-webkit-animation: blink 1.06s steps(1) infinite;
-moz-animation: blink 1.06s steps(1) infinite;
animation: blink 1.06s steps(1) infinite;
background-color: #7e7;
}
.root :global(.ReactCodeMirror) {
width: 100%;
height: 100%;
}
.root :global(.cm-tab) {
display: inline-block;
text-decoration: inherit;
}
.root :global(.CodeMirror-rulers) {
position: absolute;
left: 0;
right: 0;
top: -50px;
bottom: -20px;
overflow: hidden;
}
.root :global(.CodeMirror-ruler) {
border-left: 1px solid #ccc;
top: 0;
bottom: 0;
position: absolute;
}
/* DEFAULT THEME */
.root :global(.cm-s-default .cm-header) {
color: blue;
}
.root :global(.cm-s-default .cm-quote) {
color: #090;
}
.root :global(.cm-negative) {
color: #d44;
}
.root :global(.cm-positive) {
color: #292;
}
.root :global(.cm-header, .cm-strong) {
font-weight: bold;
}
.root :global(.cm-em) {
font-style: italic;
}
.root :global(.cm-link) {
text-decoration: underline;
}
.root :global(.cm-strikethrough) {
text-decoration: line-through;
}
.root :global(.cm-s-default .cm-keyword) {
color: #708;
}
.root :global(.cm-s-default .cm-atom) {
color: #219;
}
.root :global(.cm-s-default .cm-number) {
color: #164;
}
.root :global(.cm-s-default .cm-def) {
color: #00f;
}
.root :global(.cm-s-default .cm-variable-2) {
color: #05a;
}
.root :global(.cm-s-default .cm-variable-3) {
color: #085;
}
.root :global(.cm-s-default .cm-comment) {
color: #a50;
}
.root :global(.cm-s-default .cm-string) {
color: #a11;
}
.root :global(.cm-s-default .cm-string-2) {
color: #f50;
}
.root :global(.cm-s-default .cm-meta) {
color: #555;
}
.root :global(.cm-s-default .cm-qualifier) {
color: #555;
}
.root :global(.cm-s-default .cm-builtin) {
color: #30a;
}
.root :global(.cm-s-default .cm-bracket) {
color: #997;
}
.root :global(.cm-s-default .cm-tag) {
color: #170;
}
.root :global(.cm-s-default .cm-attribute) {
color: #00c;
}
.root :global(.cm-s-default .cm-hr) {
color: #999;
}
.root :global(.cm-s-default .cm-link) {
color: #00c;
}
.root :global(.cm-s-default .cm-error) {
color: #f00;
}
.root :global(.cm-invalidchar) {
color: #f00;
}
.root :global(.CodeMirror-composing) {
border-bottom: 2px solid;
}
/* Default styles for common addons */
.root :global(div.CodeMirror span.CodeMirror-matchingbracket) {
color: #0f0;
}
.root :global(div.CodeMirror span.CodeMirror-nonmatchingbracket) {
color: #f22;
}
.root :global(.CodeMirror-matchingtag) {
background: rgba(255, 150, 0, 0.3);
}
.root :global(.CodeMirror-activeline-background) {
background: #e8f2ff;
}
/* STOP */
/* The rest of this file contains styles related to the mechanics of
the editor. You probably shouldn't touch them. */
.root :global(.Resizer) {
background: #000;
opacity: 0.2;
z-index: 1;
box-sizing: border-box;
background-clip: padding-box;
}
.root :global(.Resizer:hover) {
transition: all 2s ease;
}
.root :global(.Resizer.horizontal) {
height: 11px;
margin: -5px 0;
border-top: 5px solid rgba(255, 255, 255, 0);
border-bottom: 5px solid rgba(255, 255, 255, 0);
cursor: row-resize;
width: 100%;
}
.root :global(.Resizer.horizontal:hover) {
border-top: 5px solid rgba(0, 0, 0, 0.5);
border-bottom: 5px solid rgba(0, 0, 0, 0.5);
}
.root :global(.Resizer.vertical) {
width: 11px;
margin: 0 -5px;
border-left: 5px solid rgba(255, 255, 255, 0);
border-right: 5px solid rgba(255, 255, 255, 0);
cursor: col-resize;
}
.root :global(.Resizer.vertical:hover) {
border-left: 5px solid rgba(0, 0, 0, 0.5);
border-right: 5px solid rgba(0, 0, 0, 0.5);
}
.root :global(.Resizer.disabled) {
cursor: not-allowed;
}
.root :global(.Resizer.disabled:hover) {
border-color: transparent;
}
.root :global(.CodeMirror) {
position: relative;
overflow: hidden;
background: transparent;
}
.root :global(.CodeMirror-scroll) {
box-sizing: border-box;
overflow: auto ;
height: 100%;
outline: none; /* Prevent dragging from highlighting the element */
position: relative;
}
.root :global(.CodeMirror-sizer) {
position: relative;
border-right: 30px solid transparent;
}
.root :global(.CodeMirror-scrollbar-filler) {
right: 0;
bottom: 0;
}
.root :global(.CodeMirror-gutter-filler) {
left: 0;
bottom: 0;
}
.root :global(.CodeMirror-gutters) {
position: absolute;
left: 0;
top: 0;
min-height: 100%;
z-index: 3;
}
.root :global(.CodeMirror-gutter) {
white-space: normal;
height: 100%;
display: inline-block;
vertical-align: top;
margin-bottom: -30px;
}
.root :global(.CodeMirror-gutter-wrapper) {
position: absolute;
z-index: 4;
background: none ;
border: none ;
}
.root :global(.CodeMirror-gutter-background) {
position: absolute;
top: 0;
bottom: 0;
z-index: 4;
}
.root :global(.CodeMirror-gutter-elt) {
position: absolute;
cursor: default;
z-index: 4;
}
.root :global(.CodeMirror-gutter-wrapper ::selection) {
background-color: transparent;
}
.root :global(.CodeMirror-gutter-wrapper ::-moz-selection) {
background-color: transparent;
}
.root :global(.CodeMirror-lines) {
cursor: text;
min-height: 1px; /* prevents collapsing before first draw */
}
.root :global(.CodeMirror pre) {
/* Reset some styles that the rest of the page might have set */
border-radius: 0;
border-width: 0;
background: transparent;
font-family: inherit;
font-size: inherit;
margin: 0;
white-space: pre;
word-wrap: normal;
line-height: inherit;
color: inherit;
z-index: 2;
position: relative;
overflow: visible;
-webkit-tap-highlight-color: transparent;
-webkit-font-variant-ligatures: contextual;
font-variant-ligatures: contextual;
}
.root :global(.CodeMirror-wrap pre) {
word-wrap: break-word;
white-space: pre-wrap;
word-break: normal;
}
.root :global(.CodeMirror-linebackground) {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 0;
}
.root :global(.CodeMirror-linewidget) {
position: relative;
z-index: 2;
overflow: auto;
}
.root :global(.CodeMirror-code) {
outline: none;
}
/* Force content-box sizing for the elements where we expect it */
.root
:global(.CodeMirror-scroll, .CodeMirror-sizer, .CodeMirror-gutter, .CodeMirror-gutters, .CodeMirror-linenumber) {
-moz-box-sizing: content-box;
box-sizing: content-box;
}
.root :global(.CodeMirror-measure) {
position: absolute;
width: 100%;
height: 0;
overflow: hidden;
visibility: hidden;
}
.root :global(.CodeMirror-cursor) {
position: absolute;
pointer-events: none;
}
.root :global(.CodeMirror-measure pre) {
position: static;
}
.root :global(div.CodeMirror-cursors) {
visibility: hidden;
position: relative;
z-index: 3;
}
.root :global(div.CodeMirror-dragcursors) {
visibility: visible;
}
.root :global(.CodeMirror-focused div.CodeMirror-cursors) {
visibility: visible;
}
.root :global(.CodeMirror-selected) {
background: #d9d9d9;
}
.root :global(.CodeMirror-focused .CodeMirror-selected) {
background: #d7d4f0;
}
.root :global(.CodeMirror-crosshair) {
cursor: crosshair;
}
.root
:global(.CodeMirror-line::selection, .CodeMirror-line
> span::selection, .CodeMirror-line > span > span::selection) {
background: #d7d4f0;
}
.root
:global(.CodeMirror-line::-moz-selection, .CodeMirror-line
> span::-moz-selection, .CodeMirror-line > span > span::-moz-selection) {
background: #d7d4f0;
}
.root :global(.cm-searching) {
background: #ffa;
background: rgba(255, 255, 0, 0.4);
}
/* Used to force a border model for a node */
.root :global(.cm-force-border) {
padding-right: 0.1px;
}
@media print {
/* Hide the cursor when printing */
.root :global(.CodeMirror div.CodeMirror-cursors) {
visibility: hidden;
}
}
/* See issue #2901 */
.root :global(.cm-tab-wrap-hack::after) {
content: '';
}
/* Help users use markselection to safely style text background */
.root :global(span.CodeMirror-selectedtext) {
background: none;
}
.root :global(.CodeMirror-hints) {
position: absolute;
z-index: 100;
padding: 0;
margin: 0;
background-color: #eee;
box-shadow: 0 0 10px #999;
font-family: monospace;
color: black;
}
.root :global(.CodeMirror-hint) {
display: block;
color: #000;
}
.root :global(.CodeMirror-hint-active) {
background-color: blue;
color: #fff;
}