@finos/perspective-viewer
Version:
The `<perspective-viewer>` Custom Element, frontend for Perspective.js
145 lines (124 loc) • 3.5 kB
text/less
/******************************************************************************
*
* Copyright (c) 2017, the Perspective Authors.
*
* This file is part of the Perspective library, distributed under the terms of
* the Apache License 2.0. The full license can be found in the LICENSE file.
*
*/
@import "./monaco.less";
@import "./split-panel.less";
:host {
position: fixed;
z-index: 10000;
outline: none;
font-family: Arial;
font-size: 12px;
font-weight: 300;
border: inherit;
box-shadow: 0 2px 4px 0 rgb(0 0 0 / 10%);
user-select: none;
background-color: white;
#editor-container {
min-width: 0px;
}
.split-panel.orient-vertical > .split-panel-divider {
margin-bottom: -6px;
}
.split-panel.orient-vertical
> .split-panel-child:not(.is-width-override)
#editor-container {
height: 242px;
}
.split-panel:not(.orient-vertical)
> .split-panel-child:not(.is-width-override)
#editor-container {
width: 400px;
}
#horizontal-resize {
position: absolute;
top: 0;
bottom: 0;
right: 0;
width: 8px;
&:hover {
cursor: ew-resize;
background: rgba(0, 0, 0, 0.05);
}
}
#monaco-container {
width: 100%;
height: calc(100% - 42px);
overflow: visible;
// margin-right: 8px;
&::-webkit-resizer {
appearance: var(--monaco-container--appearance, auto);
}
}
.monaco-hover {
background-color: white;
}
.monaco-editor {
padding-top: 6px;
.cursors-layer .cursor {
visibility: var(--monaco-cursor--visibility, inherit) ;
}
}
#psp-expression-editor-actions {
display: flex;
justify-content: flex-end;
margin-left: 20px;
margin-top: 6px;
margin-right: 8px;
}
.psp-expression-editor__button {
font-family: inherit;
font-size: 14px;
border: none;
margin-left: 6px;
padding: 2px 5px;
display: flex;
align-items: center;
&:hover {
cursor: pointer;
background-color: rgba(0, 0, 0, 0.05);
}
&[disabled] {
cursor: not-allowed;
opacity: 0.5;
}
&#psp-expression-editor-button-save,
&#psp-expression-editor-button-reset {
color: inherit;
font-family: inherit;
font-weight: 300;
font-size: 12px;
height: 36px;
opacity: 0.1;
background-color: inherit;
transition: background-color 0.2s;
&:not([disabled]) {
opacity: 1;
}
&:before {
margin-right: 6px;
font-size: 14px;
font-family: var(--button--font-family, inherit);
font-display: block;
}
&:hover {
background-color: rgba(0, 0, 0, 0.05);
transition: none;
}
}
&#psp-expression-editor-button-save {
margin-right: 12px;
}
&#psp-expression-editor-button-save:before {
content: var(--save-button-icon--content, "\1F4BE");
}
&#psp-expression-editor-button-reset:before {
content: var(--reset-button-icon--content, "\27F3");
}
}
}