UNPKG

4.1 kBtext/lessView Raw
1/******************************************************************************
2*
3* Copyright (c) 2017, the Perspective Authors.
4*
5* This file is part of the Perspective library, distributed under the terms of
6* the Apache License 2.0. The full license can be found in the LICENSE file.
7*
8*/
9
10@import "variables";
11
12:host {
13 width: 100%;
14
15 .perspective-expression-editor__edit_area {
16 @default-text-color: var(--color, #666666);
17
18 background: var(--background-color, none);
19 border: 1px solid var(--inactive-color, #ccc);
20 box-sizing: border-box;
21 color: @default-text-color;
22 font-size: 12px;
23 display: block;
24 font-family: var(--interface-monospace--font-family, monospace);
25 height: 75px;
26 margin-top: 5px;
27 max-width: 250px;
28 min-height: 50px;
29 padding: 5px;
30 resize: auto;
31 outline: none;
32 overflow: auto;
33 white-space: pre-wrap;
34 width: 100%;
35
36 &:hover {
37 cursor: text;
38 }
39
40 .psp-expression__column_name {
41 font-family: var(--interface--font-family, @sans-serif-fonts);
42
43 // TODO: find a way to just use these styles instead of copying
44 // them from the row
45 &:before {
46 font-family: var(--interface-monospace--font-family, monospace);
47 position: relative;
48 display: inline-block;
49 // display: var(--name-before-display, none);
50 padding: var(--column_type--padding, 0px 5px);
51 min-width: 18px;
52 width: var(--column_type--width, auto);
53 }
54
55 &.integer:before,
56 &.float:before {
57 content: var(
58 --float--column-type--content,
59 var(--column-type--content, "123")
60 );
61 color: var(
62 --float--column-type--color,
63 var(--column-type--color, #016bc6)
64 );
65 }
66
67 &.string:before {
68 content: var(
69 --string--column-type--content,
70 var(--column-type--content, "abc")
71 );
72 color: var(
73 --string--column-type--color,
74 var(--column-type--color, #fe9292)
75 );
76 }
77
78 &.boolean:before {
79 content: var(
80 --boolean--column-type--content,
81 var(--column-type--content, "t/f")
82 );
83 color: var(
84 --boolean--column-type--color,
85 var(--column-type--color, #999999)
86 );
87 }
88
89 &.date:before {
90 content: var(
91 --date--column-type--content,
92 var(--column-type--content, "mdy")
93 );
94 color: var(
95 --date--column-type--color,
96 var(--column-type--color, #999999)
97 );
98 }
99
100 &.datetime:before {
101 content: var(
102 --datetime--column-type--content,
103 var(--column-type--content, "mdy")
104 );
105 color: var(
106 --datetime--column-type--color,
107 var(--column-type--color, #999999)
108 );
109 }
110 }
111
112 .psp-expression__function {
113 color: var(--expression--function-color, rgb(231, 131, 64));
114 }
115
116 .psp-expression__operator {
117 color: var(--expression--operator-color, rgb(100, 100, 100));
118 }
119
120 .psp-expression__suggestion {
121 color: lightgray;
122 text-decoration: underline;
123 }
124
125 .psp-expression__errored {
126 font-weight: 700;
127 color: var(--expression--error-color, rgb(250, 51, 51));
128 text-decoration: underline dotted
129 var(--expression--error-color, rgb(250, 51, 51));
130 }
131 }
132}