Skip to content

Commit 570068b

Browse files
committed
Fixed stylings
1 parent e45ecaa commit 570068b

File tree

4 files changed

+178
-6
lines changed

4 files changed

+178
-6
lines changed

index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import {Terminal} from 'xterm';
55
import * as fit from 'xterm/lib/addons/fit/fit';
66
import * as argv from 'argv-parse';
77
import * as commands from './commands.js';
8+
import './index.scss'
9+
import './xterm.scss'
810

911
Terminal.applyAddon(fit);
1012

index.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.Window_Terminal {
1+
.Window_TerminalWindow {
22
.osjs-window-content {
33
background-color: #000;
44

webpack.config.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@ if (mode === 'production') {
1717
module.exports = {
1818
mode,
1919
devtool: 'source-map',
20-
entry: [
21-
path.resolve(__dirname, 'index.js'),
22-
path.resolve(__dirname, 'index.scss')
23-
],
20+
entry: path.resolve(__dirname, 'index.js'),
2421
externals: {
2522
osjs: 'OSjs'
2623
},
@@ -50,7 +47,6 @@ module.exports = {
5047
{
5148
loader: 'sass-loader',
5249
options: {
53-
minimize,
5450
sourceMap: true
5551
}
5652
}

xterm.scss

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
2+
/**
3+
* Copyright (c) 2014 The xterm.js authors. All rights reserved.
4+
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
5+
* https://github.com/chjj/term.js
6+
* @license MIT
7+
*
8+
* Permission is hereby granted, free of charge, to any person obtaining a copy
9+
* of this software and associated documentation files (the "Software"), to deal
10+
* in the Software without restriction, including without limitation the rights
11+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+
* copies of the Software, and to permit persons to whom the Software is
13+
* furnished to do so, subject to the following conditions:
14+
*
15+
* The above copyright notice and this permission notice shall be included in
16+
* all copies or substantial portions of the Software.
17+
*
18+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24+
* THE SOFTWARE.
25+
*
26+
* Originally forked from (with the author's permission):
27+
* Fabrice Bellard's javascript vt100 for jslinux:
28+
* http://bellard.org/jslinux/
29+
* Copyright (c) 2011 Fabrice Bellard
30+
* The original design remains. The terminal itself
31+
* has been extended to include xterm CSI codes, among
32+
* other features.
33+
*/
34+
35+
.Window_TerminalWindow {
36+
/**
37+
* Default styles for xterm.js
38+
*/
39+
40+
.xterm {
41+
font-feature-settings: "liga" 0;
42+
position: relative;
43+
user-select: none;
44+
-ms-user-select: none;
45+
-webkit-user-select: none;
46+
}
47+
48+
.xterm.focus,
49+
.xterm:focus {
50+
outline: none;
51+
}
52+
53+
.xterm .xterm-helpers {
54+
position: absolute;
55+
top: 0;
56+
/**
57+
* The z-index of the helpers must be higher than the canvases in order for
58+
* IMEs to appear on top.
59+
*/
60+
z-index: 10;
61+
}
62+
63+
.xterm .xterm-helper-textarea {
64+
/*
65+
* HACK: to fix IE's blinking cursor
66+
* Move textarea out of the screen to the far left, so that the cursor is not visible.
67+
*/
68+
position: absolute;
69+
opacity: 0;
70+
left: -9999em;
71+
top: 0;
72+
width: 0;
73+
height: 0;
74+
z-index: -10;
75+
/** Prevent wrapping so the IME appears against the textarea at the correct position */
76+
white-space: nowrap;
77+
overflow: hidden;
78+
resize: none;
79+
}
80+
81+
.xterm .composition-view {
82+
/* TODO: Composition position got messed up somewhere */
83+
background: #000;
84+
color: #FFF;
85+
display: none;
86+
position: absolute;
87+
white-space: nowrap;
88+
z-index: 1;
89+
}
90+
91+
.xterm .composition-view.active {
92+
display: block;
93+
}
94+
95+
.xterm .xterm-viewport {
96+
/* On OS X this is required in order for the scroll bar to appear fully opaque */
97+
background-color: #000;
98+
overflow-y: scroll;
99+
cursor: default;
100+
position: absolute;
101+
right: 0;
102+
left: 0;
103+
top: 0;
104+
bottom: 0;
105+
}
106+
107+
.xterm .xterm-screen {
108+
position: relative;
109+
}
110+
111+
.xterm .xterm-screen canvas {
112+
position: absolute;
113+
left: 0;
114+
top: 0;
115+
}
116+
117+
.xterm .xterm-scroll-area {
118+
visibility: hidden;
119+
}
120+
121+
.xterm-char-measure-element {
122+
display: inline-block;
123+
visibility: hidden;
124+
position: absolute;
125+
top: 0;
126+
left: -9999em;
127+
line-height: normal;
128+
}
129+
130+
.xterm {
131+
cursor: text;
132+
}
133+
134+
.xterm.enable-mouse-events {
135+
/* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */
136+
cursor: default;
137+
}
138+
139+
.xterm.xterm-cursor-pointer {
140+
cursor: pointer;
141+
}
142+
143+
.xterm.column-select.focus {
144+
/* Column selection mode */
145+
cursor: crosshair;
146+
}
147+
148+
.xterm .xterm-accessibility,
149+
.xterm .xterm-message {
150+
position: absolute;
151+
left: 0;
152+
top: 0;
153+
bottom: 0;
154+
right: 0;
155+
z-index: 100;
156+
color: transparent;
157+
}
158+
159+
.xterm .live-region {
160+
position: absolute;
161+
left: -9999px;
162+
width: 1px;
163+
height: 1px;
164+
overflow: hidden;
165+
}
166+
167+
.xterm-dim {
168+
opacity: 0.5;
169+
}
170+
171+
.xterm-underline {
172+
text-decoration: underline;
173+
}
174+
}

0 commit comments

Comments
 (0)