mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
more css color work.
This commit is contained in:
@@ -5,6 +5,10 @@
|
||||
Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
||||
-->
|
||||
<style>
|
||||
html {
|
||||
background: #555;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin-bottom: 20px;
|
||||
font: 20px/1.5 sans-serif;
|
||||
|
||||
+23
-6
@@ -652,6 +652,23 @@ Terminal.insertStyle = function(document, bg, fg) {
|
||||
+ ' background: ' + fg + ';\n'
|
||||
+ '}\n';
|
||||
|
||||
// var out = '';
|
||||
// each(Terminal.colors, function(color, i) {
|
||||
// if (i === 256) {
|
||||
// i = 'default';
|
||||
// out += '\n.term-bg-color-' + i + ' { background-color: ' + color + '; }';
|
||||
// return;
|
||||
// }
|
||||
// if (i === 257) {
|
||||
// i = 'default';
|
||||
// out += '\n.term-fg-color-' + i + ' { color: ' + color + '; }';
|
||||
// return;
|
||||
// }
|
||||
// out += '\n.term-bg-color-' + i + ' { background-color: ' + color + '; }';
|
||||
// out += '\n.term-fg-color-' + i + ' { color: ' + color + '; }';
|
||||
// });
|
||||
// style.innerHTML += out + '\n';
|
||||
|
||||
head.insertBefore(style, head.firstChild);
|
||||
};
|
||||
|
||||
@@ -1246,6 +1263,12 @@ Terminal.prototype.refresh = function(start, end) {
|
||||
out += 'visibility:hidden;';
|
||||
}
|
||||
|
||||
// out += '" class="'
|
||||
// + 'term-bg-color-' + (bg === 256 ? 'default' : bg)
|
||||
// + ' '
|
||||
// + 'term-fg-color-' + (fg === 257 ? 'default' : fg)
|
||||
// + '">';
|
||||
|
||||
if (bg !== 256) {
|
||||
out += 'background-color:'
|
||||
+ this.colors[bg]
|
||||
@@ -1258,12 +1281,6 @@ Terminal.prototype.refresh = function(start, end) {
|
||||
+ ';';
|
||||
}
|
||||
|
||||
// out += '" class="'
|
||||
// + 'term-bg-color-' + (bg === 256 ? 'default' : bg)
|
||||
// + ' '
|
||||
// + 'term-fg-color-' + (fg === 257 ? 'default' : fg)
|
||||
// + '">';
|
||||
|
||||
out += '">';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user