Skip to content

Commit 86f8ba3

Browse files
committed
Consolidated code as discussed in #93; Block trees display at full height
1 parent 13e34d7 commit 86f8ba3

File tree

1 file changed

+32
-58
lines changed

1 file changed

+32
-58
lines changed

styles/ink.less

+32-58
Original file line numberDiff line numberDiff line change
@@ -66,70 +66,19 @@ atom-text-editor::shadow {
6666
}
6767
}
6868

69-
// TODO: more CSS sharing
70-
71-
.ink.under {
72-
padding: @component-padding * 0.5;
73-
background-color: darken(@syntax-background-color, 5%);
74-
font-size: 0.9em;
75-
border: none;
76-
border-radius: @component-border-radius;
77-
border-left: 0.15em solid @background-color-info;
78-
79-
&.error {
80-
border-left-color: @background-color-error;
81-
color: lighten(@background-color-error, 10%);
82-
}
83-
84-
&.ink-hide {
85-
height: 0;
86-
}
87-
88-
&.invalid {
89-
opacity: 0.5;
90-
&:hover {
91-
opacity: 1;
92-
}
93-
}
94-
95-
&.loading {
96-
opacity: 0.5;
97-
.icon:before {
98-
height: initial;
99-
width: initial;
100-
animation: spin 4s linear infinite;
101-
@keyframes spin { 100% { transform: rotate(1turn); } }
102-
}
103-
}
104-
105-
.fade {
106-
color: lighten(@syntax-text-color, 20%);
107-
}
108-
109-
a {
110-
color: @syntax-text-color;
111-
opacity: 0.60;
112-
}
113-
}
114-
115-
116-
.ink.inline {
69+
.result-mixin() {
11770
color: @syntax-text-color;
118-
position: relative;
119-
left: 1em;
120-
12171
pointer-events: auto;
12272

12373
&.error {
12474
color: @text-color-error;
12575
border-left: 2px solid @background-color-error;
12676
}
12777

128-
background: @syntax-background-color;
12978
border-left: 2px solid @background-color-info;
13079
border-right: 2px solid contrast(@syntax-background-color,
131-
darken(@syntax-background-color, 4%),
132-
lighten(@syntax-background-color, 4%));
80+
darken(@syntax-background-color, 4%),
81+
lighten(@syntax-background-color, 4%));
13382

13483
border-radius: 3px;
13584

@@ -138,14 +87,18 @@ atom-text-editor::shadow {
13887
opacity: 1;
13988
cursor: default;
14089

141-
max-width: 400px;
14290
overflow: hidden;
14391
white-space: pre;
14492

14593
* {
14694
vertical-align: top;
14795
}
14896

97+
a {
98+
color: @syntax-text-color;
99+
opacity: 0.65;
100+
}
101+
149102
p {
150103
margin: 0;
151104
padding: 0;
@@ -184,9 +137,7 @@ atom-text-editor::shadow {
184137
opacity: 1;
185138
}
186139
}
187-
> .tree > .body {
188-
max-height: 250px;
189-
}
140+
190141

191142
.editor.editor-colors {
192143
color: @syntax-text-color;
@@ -197,6 +148,29 @@ atom-text-editor::shadow {
197148
}
198149
}
199150

151+
.ink.inline {
152+
.result-mixin;
153+
background: @syntax-background-color;
154+
position: relative;
155+
left: 1em;
156+
max-width: 400px;
157+
158+
> .tree > .body {
159+
max-height: 250px;
160+
}
161+
}
162+
163+
.ink.under {
164+
.result-mixin;
165+
background: contrast(@syntax-background-color,
166+
darken(@syntax-background-color, 3%),
167+
lighten(@syntax-background-color, 3%));
168+
font-size: 0.9em;
169+
max-width: 100%;
170+
white-space: pre-line;
171+
padding: 0.5em 0.5em 0.5em 1em;
172+
}
173+
200174
.ink.stepper {
201175
.ink.inline();
202176
max-width: initial;

0 commit comments

Comments
 (0)