UNPKG

@finos/perspective-viewer

Version:

The `<perspective-viewer>` Custom Element, frontend for Perspective.js

138 lines (119 loc) 5.37 kB
// ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ // ┃ ██████ ██████ ██████ █ █ █ █ █ █▄ ▀███ █ ┃ // ┃ ▄▄▄▄▄█ █▄▄▄▄▄ ▄▄▄▄▄█ ▀▀▀▀▀█▀▀▀▀▀ █ ▀▀▀▀▀█ ████████▌▐███ ███▄ ▀█ █ ▀▀▀▀▀ ┃ // ┃ █▀▀▀▀▀ █▀▀▀▀▀ █▀██▀▀ ▄▄▄▄▄ █ ▄▄▄▄▄█ ▄▄▄▄▄█ ████████▌▐███ █████▄ █ ▄▄▄▄▄ ┃ // ┃ █ ██████ █ ▀█▄ █ ██████ █ ███▌▐███ ███████▄ █ ┃ // ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫ // ┃ Copyright (c) 2017, the Perspective Authors. ┃ // ┃ ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ ┃ // ┃ This file is part of the Perspective library, distributed under the terms ┃ // ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃ // ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ @import "dom/scrollbar.less"; :host { #editor { display: flex; flex: 1 1 auto; position: relative; overflow-x: visible; overflow-y: auto; @include scrollbar; #editor-height-sizer { height: 100px; } #editor-inner { overflow: hidden; position: relative; display: flex; flex: 1 1 auto; } #line_numbers { color: var(--inactive--color); background-color: var(--plugin--background, white); box-sizing: border-box; display: flex; flex-direction: column; flex: 0 0 auto; font-family: var(--interface-monospace--font-family, monospace); font-weight: 400; overflow: hidden; padding: 6px 0 6px 6px; pointer-events: none; span:after { color: var(--code-editor-error--color, red); white-space: pre; content: var(--status-icon--content, " X "); opacity: 0; } span.error_highlight:after { opacity: 1; } } pre#content { margin: 0 6px 6px 0; padding: 6px 0; // margin-left: 36px; box-sizing: border-box; pointer-events: none; font-weight: 400; font-family: var(--interface-monospace--font-family, monospace); color: var(--code-editor-error--color, red); white-space: pre; overflow: hidden; span { // display: contents; } .comment { color: var(--code-editor-comment--color, orange); } .operator { color: var(--code-editor-operator--color, green); } .unknown { color: var(--code-editor-unknown--color, red); } .symbol { color: var(--code-editor-symbol--color, #242526); } .column { color: var(--code-editor-column--color, purple); } .literal { color: var(--code-editor-literal--color, blue); } .error_highlight { // background-color: color: var(--code-editor-error--color, red); background-color: rgba(255, 0, 0, 0.1); border: 0px solid var(--code-editor-error--color, red); border-bottom-width: 1px; margin-bottom: -1px; } } #textarea_editable { @include scrollbar; position: absolute; width: 100%; height: 100%; font-family: var(--interface-monospace--font-family, monospace); font-size: 1em; resize: none; padding: 6px 0; margin: 0; border: none; outline: none; color: transparent; caret-color: var(--code-editor-symbol--color, #242526); white-space: pre; box-sizing: border-box; background-color: transparent; } &.wordwrap { #textarea_editable, #content { white-space: pre-wrap; word-wrap: break-word; } } } }