more css color work.

This commit is contained in:
Christopher Jeffrey
2013-08-26 22:14:07 -05:00
parent 0152104b5f
commit e11208f5bd
2 changed files with 27 additions and 6 deletions
+4
View File
@@ -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
View File
@@ -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 += '">';
}
}