]> git.proxmox.com Git - mirror_xterm.js.git/commitdiff
Started implementing theming.
authorparis <pariskasidiaris@gmail.com>
Mon, 24 Mar 2014 17:56:49 +0000 (17:56 +0000)
committerparis <pariskasidiaris@gmail.com>
Mon, 24 Mar 2014 17:56:49 +0000 (17:56 +0000)
demo/main.js
src/xterm.css
src/xterm.js

index 05a7d151ca171158c06189116fffe3b909517908..1b1c10ecc3712e6029c916de6782297016d06ddc 100644 (file)
@@ -1,5 +1,8 @@
 var terminalContainer = document.getElementById('terminal-container'),
-    term = new Terminal({geometry: [95, 37]});
+    term = new Terminal({
+      geometry: [95, 37],
+      theme: 'crazy'
+    });
 
 term.prompt = function () {
     term.write('>  ');
@@ -12,7 +15,6 @@ term.writeln('');
 term.prompt();
 
 term.on('key', function (key, ev) {
-    console.log(this, key, ev);
     if (ev.keyIdentifier == 'Enter') {
         term.writeln('');
         term.prompt();
index bee2e8582dce38cd1c0170a942a01de9992f9e43..d785a3a036338b2f3c206e59c57c5abd865d8992 100644 (file)
 /*
 *  Determine default colors for xterm.js
 */
-.terminal .terminal-color-0 { 
+.terminal .xterm-bold {
+    font-weight: bold;
+}
+
+.terminal .xterm-underline {
+    text-decoration: underline;
+}
+
+.terminal .xterm-blink {
+    text-decoration: blink;
+}
+
+.terminal .xterm-hidden {
+    visibility: hidden;
+}
+
+.terminal .xterm-color-0 { 
     color: #2e3436;
 }
 
-.terminal .terminal-color-1 { 
+.terminal .xterm-bg-color-0 { 
+    background-color: #2e3436;
+}
+
+.terminal .xterm-color-1 { 
     color: #cc0000;
 }
 
-.terminal .terminal-color-2 { 
+.terminal .xterm-bg-color-1 { 
+    background-color: #cc0000;
+}
+
+.terminal .xterm-color-2 { 
     color: #4e9a06;
 }
 
-.terminal .terminal-color-3 { 
+.terminal .xterm-bg-color-2 { 
+    background-color: #4e9a06;
+}
+
+.terminal .xterm-color-3 { 
     color: #c4a000;
 }
 
-.terminal .terminal-color-4 { 
+.terminal .xterm-bg-color-3 { 
+    background-color: #c4a000;
+}
+
+.terminal .xterm-color-4 { 
     color: #3465a4;
 }
 
-.terminal .terminal-color-5 { 
+.terminal .xterm-bg-color-4 { 
+    background-color: #3465a4;
+}
+
+.terminal .xterm-color-5 { 
     color: #75507b;
 }
 
-.terminal .terminal-color-6 { 
+.terminal .xterm-bg-color-5 { 
+    background-color: #75507b;
+}
+
+.terminal .xterm-color-6 { 
     color: #06989a;
 }
 
-.terminal .terminal-color-7 { 
+.terminal .xterm-bg-color-6 { 
+    background-color: #06989a;
+}
+
+.terminal .xterm-color-7 { 
     color: #d3d7cf;
 }
 
-.terminal .terminal-color-8 { 
+.terminal .xterm-bg-color-7 { 
+    background-color: #d3d7cf;
+}
+
+.terminal .xterm-color-8 { 
     color: #555753;
 }
 
-.terminal .terminal-color-9 { 
+.terminal .xterm-bg-color-8 { 
+    background-color: #555753;
+}
+
+.terminal .xterm-color-9 { 
     color: #ef2929;
 }
 
-.terminal .terminal-color-10 { 
+.terminal .xterm-bg-color-9 { 
+    background-color: #ef2929;
+}
+
+.terminal .xterm-color-10 { 
     color: #8ae234;
 }
 
-.terminal .terminal-color-11 { 
+.terminal .xterm-bg-color-10 { 
+    background-color: #8ae234;
+}
+
+.terminal .xterm-color-11 { 
     color: #fce94f;
 }
 
-.terminal .terminal-color-12 { 
+.terminal .xterm-bg-color-11 { 
+    background-color: #fce94f;
+}
+
+.terminal .xterm-color-12 { 
     color: #729fcf;
 }
 
-.terminal .terminal-color-13 { 
+.terminal .xterm-bg-color-12 { 
+    background-color: #729fcf;
+}
+
+.terminal .xterm-color-13 { 
     color: #ad7fa8;
 }
 
-.terminal .terminal-color-14 { 
+.terminal .xterm-bg-color-13 { 
+    background-color: #ad7fa8;
+}
+
+.terminal .xterm-color-14 { 
     color: #34e2e2;
 }
 
-.terminal .terminal-color-15 { 
+.terminal .xterm-bg-color-14 { 
+    background-color: #34e2e2;
+}
+
+.terminal .xterm-color-15 { 
     color: #eeeeec;
 }
 
-.terminal .terminal-color-16 { 
+.terminal .xterm-bg-color-15 { 
+    background-color: #eeeeec;
+}
+
+.terminal .xterm-color-16 { 
     color: #000000;
 }
 
-.terminal .terminal-color-17 { 
+.terminal .xterm-bg-color-16 { 
+    background-color: #000000;
+}
+
+.terminal .xterm-color-17 { 
     color: #00005f;
 }
 
-.terminal .terminal-color-18 { 
+.terminal .xterm-bg-color-17 { 
+    background-color: #00005f;
+}
+
+.terminal .xterm-color-18 { 
     color: #000087;
 }
 
-.terminal .terminal-color-19 { 
+.terminal .xterm-bg-color-18 { 
+    background-color: #000087;
+}
+
+.terminal .xterm-color-19 { 
     color: #0000af;
 }
 
-.terminal .terminal-color-20 { 
+.terminal .xterm-bg-color-19 { 
+    background-color: #0000af;
+}
+
+.terminal .xterm-color-20 { 
     color: #0000d7;
 }
 
-.terminal .terminal-color-21 { 
+.terminal .xterm-bg-color-20 { 
+    background-color: #0000d7;
+}
+
+.terminal .xterm-color-21 { 
     color: #0000ff;
 }
 
-.terminal .terminal-color-22 { 
+.terminal .xterm-bg-color-21 { 
+    background-color: #0000ff;
+}
+
+.terminal .xterm-color-22 { 
     color: #005f00;
 }
 
-.terminal .terminal-color-23 { 
+.terminal .xterm-bg-color-22 { 
+    background-color: #005f00;
+}
+
+.terminal .xterm-color-23 { 
     color: #005f5f;
 }
 
-.terminal .terminal-color-24 { 
+.terminal .xterm-bg-color-23 { 
+    background-color: #005f5f;
+}
+
+.terminal .xterm-color-24 { 
     color: #005f87;
 }
 
-.terminal .terminal-color-25 { 
+.terminal .xterm-bg-color-24 { 
+    background-color: #005f87;
+}
+
+.terminal .xterm-color-25 { 
     color: #005faf;
 }
 
-.terminal .terminal-color-26 { 
+.terminal .xterm-bg-color-25 { 
+    background-color: #005faf;
+}
+
+.terminal .xterm-color-26 { 
     color: #005fd7;
 }
 
-.terminal .terminal-color-27 { 
+.terminal .xterm-bg-color-26 { 
+    background-color: #005fd7;
+}
+
+.terminal .xterm-color-27 { 
     color: #005fff;
 }
 
-.terminal .terminal-color-28 { 
+.terminal .xterm-bg-color-27 { 
+    background-color: #005fff;
+}
+
+.terminal .xterm-color-28 { 
     color: #008700;
 }
 
-.terminal .terminal-color-29 { 
+.terminal .xterm-bg-color-28 { 
+    background-color: #008700;
+}
+
+.terminal .xterm-color-29 { 
     color: #00875f;
 }
 
-.terminal .terminal-color-30 { 
+.terminal .xterm-bg-color-29 { 
+    background-color: #00875f;
+}
+
+.terminal .xterm-color-30 { 
     color: #008787;
 }
 
-.terminal .terminal-color-31 { 
+.terminal .xterm-bg-color-30 { 
+    background-color: #008787;
+}
+
+.terminal .xterm-color-31 { 
     color: #0087af;
 }
 
-.terminal .terminal-color-32 { 
+.terminal .xterm-bg-color-31 { 
+    background-color: #0087af;
+}
+
+.terminal .xterm-color-32 { 
     color: #0087d7;
 }
 
-.terminal .terminal-color-33 { 
+.terminal .xterm-bg-color-32 { 
+    background-color: #0087d7;
+}
+
+.terminal .xterm-color-33 { 
     color: #0087ff;
 }
 
-.terminal .terminal-color-34 { 
+.terminal .xterm-bg-color-33 { 
+    background-color: #0087ff;
+}
+
+.terminal .xterm-color-34 { 
     color: #00af00;
 }
 
-.terminal .terminal-color-35 { 
+.terminal .xterm-bg-color-34 { 
+    background-color: #00af00;
+}
+
+.terminal .xterm-color-35 { 
     color: #00af5f;
 }
 
-.terminal .terminal-color-36 { 
+.terminal .xterm-bg-color-35 { 
+    background-color: #00af5f;
+}
+
+.terminal .xterm-color-36 { 
     color: #00af87;
 }
 
-.terminal .terminal-color-37 { 
+.terminal .xterm-bg-color-36 { 
+    background-color: #00af87;
+}
+
+.terminal .xterm-color-37 { 
     color: #00afaf;
 }
 
-.terminal .terminal-color-38 { 
+.terminal .xterm-bg-color-37 { 
+    background-color: #00afaf;
+}
+
+.terminal .xterm-color-38 { 
     color: #00afd7;
 }
 
-.terminal .terminal-color-39 { 
+.terminal .xterm-bg-color-38 { 
+    background-color: #00afd7;
+}
+
+.terminal .xterm-color-39 { 
     color: #00afff;
 }
 
-.terminal .terminal-color-40 { 
+.terminal .xterm-bg-color-39 { 
+    background-color: #00afff;
+}
+
+.terminal .xterm-color-40 { 
     color: #00d700;
 }
 
-.terminal .terminal-color-41 { 
+.terminal .xterm-bg-color-40 { 
+    background-color: #00d700;
+}
+
+.terminal .xterm-color-41 { 
     color: #00d75f;
 }
 
-.terminal .terminal-color-42 { 
+.terminal .xterm-bg-color-41 { 
+    background-color: #00d75f;
+}
+
+.terminal .xterm-color-42 { 
     color: #00d787;
 }
 
-.terminal .terminal-color-43 { 
+.terminal .xterm-bg-color-42 { 
+    background-color: #00d787;
+}
+
+.terminal .xterm-color-43 { 
     color: #00d7af;
 }
 
-.terminal .terminal-color-44 { 
+.terminal .xterm-bg-color-43 { 
+    background-color: #00d7af;
+}
+
+.terminal .xterm-color-44 { 
     color: #00d7d7;
 }
 
-.terminal .terminal-color-45 { 
+.terminal .xterm-bg-color-44 { 
+    background-color: #00d7d7;
+}
+
+.terminal .xterm-color-45 { 
     color: #00d7ff;
 }
 
-.terminal .terminal-color-46 { 
+.terminal .xterm-bg-color-45 { 
+    background-color: #00d7ff;
+}
+
+.terminal .xterm-color-46 { 
     color: #00ff00;
 }
 
-.terminal .terminal-color-47 { 
+.terminal .xterm-bg-color-46 { 
+    background-color: #00ff00;
+}
+
+.terminal .xterm-color-47 { 
     color: #00ff5f;
 }
 
-.terminal .terminal-color-48 { 
+.terminal .xterm-bg-color-47 { 
+    background-color: #00ff5f;
+}
+
+.terminal .xterm-color-48 { 
     color: #00ff87;
 }
 
-.terminal .terminal-color-49 { 
+.terminal .xterm-bg-color-48 { 
+    background-color: #00ff87;
+}
+
+.terminal .xterm-color-49 { 
     color: #00ffaf;
 }
 
-.terminal .terminal-color-50 { 
+.terminal .xterm-bg-color-49 { 
+    background-color: #00ffaf;
+}
+
+.terminal .xterm-color-50 { 
     color: #00ffd7;
 }
 
-.terminal .terminal-color-51 { 
+.terminal .xterm-bg-color-50 { 
+    background-color: #00ffd7;
+}
+
+.terminal .xterm-color-51 { 
     color: #00ffff;
 }
 
-.terminal .terminal-color-52 { 
+.terminal .xterm-bg-color-51 { 
+    background-color: #00ffff;
+}
+
+.terminal .xterm-color-52 { 
     color: #5f0000;
 }
 
-.terminal .terminal-color-53 { 
+.terminal .xterm-bg-color-52 { 
+    background-color: #5f0000;
+}
+
+.terminal .xterm-color-53 { 
     color: #5f005f;
 }
 
-.terminal .terminal-color-54 { 
+.terminal .xterm-bg-color-53 { 
+    background-color: #5f005f;
+}
+
+.terminal .xterm-color-54 { 
     color: #5f0087;
 }
 
-.terminal .terminal-color-55 { 
+.terminal .xterm-bg-color-54 { 
+    background-color: #5f0087;
+}
+
+.terminal .xterm-color-55 { 
     color: #5f00af;
 }
 
-.terminal .terminal-color-56 { 
+.terminal .xterm-bg-color-55 { 
+    background-color: #5f00af;
+}
+
+.terminal .xterm-color-56 { 
     color: #5f00d7;
 }
 
-.terminal .terminal-color-57 { 
+.terminal .xterm-bg-color-56 { 
+    background-color: #5f00d7;
+}
+
+.terminal .xterm-color-57 { 
     color: #5f00ff;
 }
 
-.terminal .terminal-color-58 { 
+.terminal .xterm-bg-color-57 { 
+    background-color: #5f00ff;
+}
+
+.terminal .xterm-color-58 { 
     color: #5f5f00;
 }
 
-.terminal .terminal-color-59 { 
+.terminal .xterm-bg-color-58 { 
+    background-color: #5f5f00;
+}
+
+.terminal .xterm-color-59 { 
     color: #5f5f5f;
 }
 
-.terminal .terminal-color-60 { 
+.terminal .xterm-bg-color-59 { 
+    background-color: #5f5f5f;
+}
+
+.terminal .xterm-color-60 { 
     color: #5f5f87;
 }
 
-.terminal .terminal-color-61 { 
+.terminal .xterm-bg-color-60 { 
+    background-color: #5f5f87;
+}
+
+.terminal .xterm-color-61 { 
     color: #5f5faf;
 }
 
-.terminal .terminal-color-62 { 
+.terminal .xterm-bg-color-61 { 
+    background-color: #5f5faf;
+}
+
+.terminal .xterm-color-62 { 
     color: #5f5fd7;
 }
 
-.terminal .terminal-color-63 { 
+.terminal .xterm-bg-color-62 { 
+    background-color: #5f5fd7;
+}
+
+.terminal .xterm-color-63 { 
     color: #5f5fff;
 }
 
-.terminal .terminal-color-64 { 
+.terminal .xterm-bg-color-63 { 
+    background-color: #5f5fff;
+}
+
+.terminal .xterm-color-64 { 
     color: #5f8700;
 }
 
-.terminal .terminal-color-65 { 
+.terminal .xterm-bg-color-64 { 
+    background-color: #5f8700;
+}
+
+.terminal .xterm-color-65 { 
     color: #5f875f;
 }
 
-.terminal .terminal-color-66 { 
+.terminal .xterm-bg-color-65 { 
+    background-color: #5f875f;
+}
+
+.terminal .xterm-color-66 { 
     color: #5f8787;
 }
 
-.terminal .terminal-color-67 { 
+.terminal .xterm-bg-color-66 { 
+    background-color: #5f8787;
+}
+
+.terminal .xterm-color-67 { 
     color: #5f87af;
 }
 
-.terminal .terminal-color-68 { 
+.terminal .xterm-bg-color-67 { 
+    background-color: #5f87af;
+}
+
+.terminal .xterm-color-68 { 
     color: #5f87d7;
 }
 
-.terminal .terminal-color-69 { 
+.terminal .xterm-bg-color-68 { 
+    background-color: #5f87d7;
+}
+
+.terminal .xterm-color-69 { 
     color: #5f87ff;
 }
 
-.terminal .terminal-color-70 { 
+.terminal .xterm-bg-color-69 { 
+    background-color: #5f87ff;
+}
+
+.terminal .xterm-color-70 { 
     color: #5faf00;
 }
 
-.terminal .terminal-color-71 { 
+.terminal .xterm-bg-color-70 { 
+    background-color: #5faf00;
+}
+
+.terminal .xterm-color-71 { 
     color: #5faf5f;
 }
 
-.terminal .terminal-color-72 { 
+.terminal .xterm-bg-color-71 { 
+    background-color: #5faf5f;
+}
+
+.terminal .xterm-color-72 { 
     color: #5faf87;
 }
 
-.terminal .terminal-color-73 { 
+.terminal .xterm-bg-color-72 { 
+    background-color: #5faf87;
+}
+
+.terminal .xterm-color-73 { 
     color: #5fafaf;
 }
 
-.terminal .terminal-color-74 { 
+.terminal .xterm-bg-color-73 { 
+    background-color: #5fafaf;
+}
+
+.terminal .xterm-color-74 { 
     color: #5fafd7;
 }
 
-.terminal .terminal-color-75 { 
+.terminal .xterm-bg-color-74 { 
+    background-color: #5fafd7;
+}
+
+.terminal .xterm-color-75 { 
     color: #5fafff;
 }
 
-.terminal .terminal-color-76 { 
+.terminal .xterm-bg-color-75 { 
+    background-color: #5fafff;
+}
+
+.terminal .xterm-color-76 { 
     color: #5fd700;
 }
 
-.terminal .terminal-color-77 { 
+.terminal .xterm-bg-color-76 { 
+    background-color: #5fd700;
+}
+
+.terminal .xterm-color-77 { 
     color: #5fd75f;
 }
 
-.terminal .terminal-color-78 { 
+.terminal .xterm-bg-color-77 { 
+    background-color: #5fd75f;
+}
+
+.terminal .xterm-color-78 { 
     color: #5fd787;
 }
 
-.terminal .terminal-color-79 { 
+.terminal .xterm-bg-color-78 { 
+    background-color: #5fd787;
+}
+
+.terminal .xterm-color-79 { 
     color: #5fd7af;
 }
 
-.terminal .terminal-color-80 { 
+.terminal .xterm-bg-color-79 { 
+    background-color: #5fd7af;
+}
+
+.terminal .xterm-color-80 { 
     color: #5fd7d7;
 }
 
-.terminal .terminal-color-81 { 
+.terminal .xterm-bg-color-80 { 
+    background-color: #5fd7d7;
+}
+
+.terminal .xterm-color-81 { 
     color: #5fd7ff;
 }
 
-.terminal .terminal-color-82 { 
+.terminal .xterm-bg-color-81 { 
+    background-color: #5fd7ff;
+}
+
+.terminal .xterm-color-82 { 
     color: #5fff00;
 }
 
-.terminal .terminal-color-83 { 
+.terminal .xterm-bg-color-82 { 
+    background-color: #5fff00;
+}
+
+.terminal .xterm-color-83 { 
     color: #5fff5f;
 }
 
-.terminal .terminal-color-84 { 
+.terminal .xterm-bg-color-83 { 
+    background-color: #5fff5f;
+}
+
+.terminal .xterm-color-84 { 
     color: #5fff87;
 }
 
-.terminal .terminal-color-85 { 
+.terminal .xterm-bg-color-84 { 
+    background-color: #5fff87;
+}
+
+.terminal .xterm-color-85 { 
     color: #5fffaf;
 }
 
-.terminal .terminal-color-86 { 
+.terminal .xterm-bg-color-85 { 
+    background-color: #5fffaf;
+}
+
+.terminal .xterm-color-86 { 
     color: #5fffd7;
 }
 
-.terminal .terminal-color-87 { 
+.terminal .xterm-bg-color-86 { 
+    background-color: #5fffd7;
+}
+
+.terminal .xterm-color-87 { 
     color: #5fffff;
 }
 
-.terminal .terminal-color-88 { 
+.terminal .xterm-bg-color-87 { 
+    background-color: #5fffff;
+}
+
+.terminal .xterm-color-88 { 
     color: #870000;
 }
 
-.terminal .terminal-color-89 { 
+.terminal .xterm-bg-color-88 { 
+    background-color: #870000;
+}
+
+.terminal .xterm-color-89 { 
     color: #87005f;
 }
 
-.terminal .terminal-color-90 { 
+.terminal .xterm-bg-color-89 { 
+    background-color: #87005f;
+}
+
+.terminal .xterm-color-90 { 
     color: #870087;
 }
 
-.terminal .terminal-color-91 { 
+.terminal .xterm-bg-color-90 { 
+    background-color: #870087;
+}
+
+.terminal .xterm-color-91 { 
     color: #8700af;
 }
 
-.terminal .terminal-color-92 { 
+.terminal .xterm-bg-color-91 { 
+    background-color: #8700af;
+}
+
+.terminal .xterm-color-92 { 
     color: #8700d7;
 }
 
-.terminal .terminal-color-93 { 
+.terminal .xterm-bg-color-92 { 
+    background-color: #8700d7;
+}
+
+.terminal .xterm-color-93 { 
     color: #8700ff;
 }
 
-.terminal .terminal-color-94 { 
+.terminal .xterm-bg-color-93 { 
+    background-color: #8700ff;
+}
+
+.terminal .xterm-color-94 { 
     color: #875f00;
 }
 
-.terminal .terminal-color-95 { 
+.terminal .xterm-bg-color-94 { 
+    background-color: #875f00;
+}
+
+.terminal .xterm-color-95 { 
     color: #875f5f;
 }
 
-.terminal .terminal-color-96 { 
+.terminal .xterm-bg-color-95 { 
+    background-color: #875f5f;
+}
+
+.terminal .xterm-color-96 { 
     color: #875f87;
 }
 
-.terminal .terminal-color-97 { 
+.terminal .xterm-bg-color-96 { 
+    background-color: #875f87;
+}
+
+.terminal .xterm-color-97 { 
     color: #875faf;
 }
 
-.terminal .terminal-color-98 { 
+.terminal .xterm-bg-color-97 { 
+    background-color: #875faf;
+}
+
+.terminal .xterm-color-98 { 
     color: #875fd7;
 }
 
-.terminal .terminal-color-99 { 
+.terminal .xterm-bg-color-98 { 
+    background-color: #875fd7;
+}
+
+.terminal .xterm-color-99 { 
     color: #875fff;
 }
 
-.terminal .terminal-color-100 { 
+.terminal .xterm-bg-color-99 { 
+    background-color: #875fff;
+}
+
+.terminal .xterm-color-100 { 
     color: #878700;
 }
 
-.terminal .terminal-color-101 { 
+.terminal .xterm-bg-color-100 { 
+    background-color: #878700;
+}
+
+.terminal .xterm-color-101 { 
     color: #87875f;
 }
 
-.terminal .terminal-color-102 { 
+.terminal .xterm-bg-color-101 { 
+    background-color: #87875f;
+}
+
+.terminal .xterm-color-102 { 
     color: #878787;
 }
 
-.terminal .terminal-color-103 { 
+.terminal .xterm-bg-color-102 { 
+    background-color: #878787;
+}
+
+.terminal .xterm-color-103 { 
     color: #8787af;
 }
 
-.terminal .terminal-color-104 { 
+.terminal .xterm-bg-color-103 { 
+    background-color: #8787af;
+}
+
+.terminal .xterm-color-104 { 
     color: #8787d7;
 }
 
-.terminal .terminal-color-105 { 
+.terminal .xterm-bg-color-104 { 
+    background-color: #8787d7;
+}
+
+.terminal .xterm-color-105 { 
     color: #8787ff;
 }
 
-.terminal .terminal-color-106 { 
+.terminal .xterm-bg-color-105 { 
+    background-color: #8787ff;
+}
+
+.terminal .xterm-color-106 { 
     color: #87af00;
 }
 
-.terminal .terminal-color-107 { 
+.terminal .xterm-bg-color-106 { 
+    background-color: #87af00;
+}
+
+.terminal .xterm-color-107 { 
     color: #87af5f;
 }
 
-.terminal .terminal-color-108 { 
+.terminal .xterm-bg-color-107 { 
+    background-color: #87af5f;
+}
+
+.terminal .xterm-color-108 { 
     color: #87af87;
 }
 
-.terminal .terminal-color-109 { 
+.terminal .xterm-bg-color-108 { 
+    background-color: #87af87;
+}
+
+.terminal .xterm-color-109 { 
     color: #87afaf;
 }
 
-.terminal .terminal-color-110 { 
+.terminal .xterm-bg-color-109 { 
+    background-color: #87afaf;
+}
+
+.terminal .xterm-color-110 { 
     color: #87afd7;
 }
 
-.terminal .terminal-color-111 { 
+.terminal .xterm-bg-color-110 { 
+    background-color: #87afd7;
+}
+
+.terminal .xterm-color-111 { 
     color: #87afff;
 }
 
-.terminal .terminal-color-112 { 
+.terminal .xterm-bg-color-111 { 
+    background-color: #87afff;
+}
+
+.terminal .xterm-color-112 { 
     color: #87d700;
 }
 
-.terminal .terminal-color-113 { 
+.terminal .xterm-bg-color-112 { 
+    background-color: #87d700;
+}
+
+.terminal .xterm-color-113 { 
     color: #87d75f;
 }
 
-.terminal .terminal-color-114 { 
+.terminal .xterm-bg-color-113 { 
+    background-color: #87d75f;
+}
+
+.terminal .xterm-color-114 { 
     color: #87d787;
 }
 
-.terminal .terminal-color-115 { 
+.terminal .xterm-bg-color-114 { 
+    background-color: #87d787;
+}
+
+.terminal .xterm-color-115 { 
     color: #87d7af;
 }
 
-.terminal .terminal-color-116 { 
+.terminal .xterm-bg-color-115 { 
+    background-color: #87d7af;
+}
+
+.terminal .xterm-color-116 { 
     color: #87d7d7;
 }
 
-.terminal .terminal-color-117 { 
+.terminal .xterm-bg-color-116 { 
+    background-color: #87d7d7;
+}
+
+.terminal .xterm-color-117 { 
     color: #87d7ff;
 }
 
-.terminal .terminal-color-118 { 
+.terminal .xterm-bg-color-117 { 
+    background-color: #87d7ff;
+}
+
+.terminal .xterm-color-118 { 
     color: #87ff00;
 }
 
-.terminal .terminal-color-119 { 
+.terminal .xterm-bg-color-118 { 
+    background-color: #87ff00;
+}
+
+.terminal .xterm-color-119 { 
     color: #87ff5f;
 }
 
-.terminal .terminal-color-120 { 
+.terminal .xterm-bg-color-119 { 
+    background-color: #87ff5f;
+}
+
+.terminal .xterm-color-120 { 
     color: #87ff87;
 }
 
-.terminal .terminal-color-121 { 
+.terminal .xterm-bg-color-120 { 
+    background-color: #87ff87;
+}
+
+.terminal .xterm-color-121 { 
     color: #87ffaf;
 }
 
-.terminal .terminal-color-122 { 
+.terminal .xterm-bg-color-121 { 
+    background-color: #87ffaf;
+}
+
+.terminal .xterm-color-122 { 
     color: #87ffd7;
 }
 
-.terminal .terminal-color-123 { 
+.terminal .xterm-bg-color-122 { 
+    background-color: #87ffd7;
+}
+
+.terminal .xterm-color-123 { 
     color: #87ffff;
 }
 
-.terminal .terminal-color-124 { 
+.terminal .xterm-bg-color-123 { 
+    background-color: #87ffff;
+}
+
+.terminal .xterm-color-124 { 
     color: #af0000;
 }
 
-.terminal .terminal-color-125 { 
+.terminal .xterm-bg-color-124 { 
+    background-color: #af0000;
+}
+
+.terminal .xterm-color-125 { 
     color: #af005f;
 }
 
-.terminal .terminal-color-126 { 
+.terminal .xterm-bg-color-125 { 
+    background-color: #af005f;
+}
+
+.terminal .xterm-color-126 { 
     color: #af0087;
 }
 
-.terminal .terminal-color-127 { 
+.terminal .xterm-bg-color-126 { 
+    background-color: #af0087;
+}
+
+.terminal .xterm-color-127 { 
     color: #af00af;
 }
 
-.terminal .terminal-color-128 { 
+.terminal .xterm-bg-color-127 { 
+    background-color: #af00af;
+}
+
+.terminal .xterm-color-128 { 
     color: #af00d7;
 }
 
-.terminal .terminal-color-129 { 
+.terminal .xterm-bg-color-128 { 
+    background-color: #af00d7;
+}
+
+.terminal .xterm-color-129 { 
     color: #af00ff;
 }
 
-.terminal .terminal-color-130 { 
+.terminal .xterm-bg-color-129 { 
+    background-color: #af00ff;
+}
+
+.terminal .xterm-color-130 { 
     color: #af5f00;
 }
 
-.terminal .terminal-color-131 { 
+.terminal .xterm-bg-color-130 { 
+    background-color: #af5f00;
+}
+
+.terminal .xterm-color-131 { 
     color: #af5f5f;
 }
 
-.terminal .terminal-color-132 { 
+.terminal .xterm-bg-color-131 { 
+    background-color: #af5f5f;
+}
+
+.terminal .xterm-color-132 { 
     color: #af5f87;
 }
 
-.terminal .terminal-color-133 { 
+.terminal .xterm-bg-color-132 { 
+    background-color: #af5f87;
+}
+
+.terminal .xterm-color-133 { 
     color: #af5faf;
 }
 
-.terminal .terminal-color-134 { 
+.terminal .xterm-bg-color-133 { 
+    background-color: #af5faf;
+}
+
+.terminal .xterm-color-134 { 
     color: #af5fd7;
 }
 
-.terminal .terminal-color-135 { 
+.terminal .xterm-bg-color-134 { 
+    background-color: #af5fd7;
+}
+
+.terminal .xterm-color-135 { 
     color: #af5fff;
 }
 
-.terminal .terminal-color-136 { 
+.terminal .xterm-bg-color-135 { 
+    background-color: #af5fff;
+}
+
+.terminal .xterm-color-136 { 
     color: #af8700;
 }
 
-.terminal .terminal-color-137 { 
+.terminal .xterm-bg-color-136 { 
+    background-color: #af8700;
+}
+
+.terminal .xterm-color-137 { 
     color: #af875f;
 }
 
-.terminal .terminal-color-138 { 
+.terminal .xterm-bg-color-137 { 
+    background-color: #af875f;
+}
+
+.terminal .xterm-color-138 { 
     color: #af8787;
 }
 
-.terminal .terminal-color-139 { 
+.terminal .xterm-bg-color-138 { 
+    background-color: #af8787;
+}
+
+.terminal .xterm-color-139 { 
     color: #af87af;
 }
 
-.terminal .terminal-color-140 { 
+.terminal .xterm-bg-color-139 { 
+    background-color: #af87af;
+}
+
+.terminal .xterm-color-140 { 
     color: #af87d7;
 }
 
-.terminal .terminal-color-141 { 
+.terminal .xterm-bg-color-140 { 
+    background-color: #af87d7;
+}
+
+.terminal .xterm-color-141 { 
     color: #af87ff;
 }
 
-.terminal .terminal-color-142 { 
+.terminal .xterm-bg-color-141 { 
+    background-color: #af87ff;
+}
+
+.terminal .xterm-color-142 { 
     color: #afaf00;
 }
 
-.terminal .terminal-color-143 { 
+.terminal .xterm-bg-color-142 { 
+    background-color: #afaf00;
+}
+
+.terminal .xterm-color-143 { 
     color: #afaf5f;
 }
 
-.terminal .terminal-color-144 { 
+.terminal .xterm-bg-color-143 { 
+    background-color: #afaf5f;
+}
+
+.terminal .xterm-color-144 { 
     color: #afaf87;
 }
 
-.terminal .terminal-color-145 { 
+.terminal .xterm-bg-color-144 { 
+    background-color: #afaf87;
+}
+
+.terminal .xterm-color-145 { 
     color: #afafaf;
 }
 
-.terminal .terminal-color-146 { 
+.terminal .xterm-bg-color-145 { 
+    background-color: #afafaf;
+}
+
+.terminal .xterm-color-146 { 
     color: #afafd7;
 }
 
-.terminal .terminal-color-147 { 
+.terminal .xterm-bg-color-146 { 
+    background-color: #afafd7;
+}
+
+.terminal .xterm-color-147 { 
     color: #afafff;
 }
 
-.terminal .terminal-color-148 { 
+.terminal .xterm-bg-color-147 { 
+    background-color: #afafff;
+}
+
+.terminal .xterm-color-148 { 
     color: #afd700;
 }
 
-.terminal .terminal-color-149 { 
+.terminal .xterm-bg-color-148 { 
+    background-color: #afd700;
+}
+
+.terminal .xterm-color-149 { 
     color: #afd75f;
 }
 
-.terminal .terminal-color-150 { 
+.terminal .xterm-bg-color-149 { 
+    background-color: #afd75f;
+}
+
+.terminal .xterm-color-150 { 
     color: #afd787;
 }
 
-.terminal .terminal-color-151 { 
+.terminal .xterm-bg-color-150 { 
+    background-color: #afd787;
+}
+
+.terminal .xterm-color-151 { 
     color: #afd7af;
 }
 
-.terminal .terminal-color-152 { 
+.terminal .xterm-bg-color-151 { 
+    background-color: #afd7af;
+}
+
+.terminal .xterm-color-152 { 
     color: #afd7d7;
 }
 
-.terminal .terminal-color-153 { 
+.terminal .xterm-bg-color-152 { 
+    background-color: #afd7d7;
+}
+
+.terminal .xterm-color-153 { 
     color: #afd7ff;
 }
 
-.terminal .terminal-color-154 { 
+.terminal .xterm-bg-color-153 { 
+    background-color: #afd7ff;
+}
+
+.terminal .xterm-color-154 { 
     color: #afff00;
 }
 
-.terminal .terminal-color-155 { 
+.terminal .xterm-bg-color-154 { 
+    background-color: #afff00;
+}
+
+.terminal .xterm-color-155 { 
     color: #afff5f;
 }
 
-.terminal .terminal-color-156 { 
+.terminal .xterm-bg-color-155 { 
+    background-color: #afff5f;
+}
+
+.terminal .xterm-color-156 { 
     color: #afff87;
 }
 
-.terminal .terminal-color-157 { 
+.terminal .xterm-bg-color-156 { 
+    background-color: #afff87;
+}
+
+.terminal .xterm-color-157 { 
     color: #afffaf;
 }
 
-.terminal .terminal-color-158 { 
+.terminal .xterm-bg-color-157 { 
+    background-color: #afffaf;
+}
+
+.terminal .xterm-color-158 { 
     color: #afffd7;
 }
 
-.terminal .terminal-color-159 { 
+.terminal .xterm-bg-color-158 { 
+    background-color: #afffd7;
+}
+
+.terminal .xterm-color-159 { 
     color: #afffff;
 }
 
-.terminal .terminal-color-160 { 
+.terminal .xterm-bg-color-159 { 
+    background-color: #afffff;
+}
+
+.terminal .xterm-color-160 { 
     color: #d70000;
 }
 
-.terminal .terminal-color-161 { 
+.terminal .xterm-bg-color-160 { 
+    background-color: #d70000;
+}
+
+.terminal .xterm-color-161 { 
     color: #d7005f;
 }
 
-.terminal .terminal-color-162 { 
+.terminal .xterm-bg-color-161 { 
+    background-color: #d7005f;
+}
+
+.terminal .xterm-color-162 { 
     color: #d70087;
 }
 
-.terminal .terminal-color-163 { 
+.terminal .xterm-bg-color-162 { 
+    background-color: #d70087;
+}
+
+.terminal .xterm-color-163 { 
     color: #d700af;
 }
 
-.terminal .terminal-color-164 { 
+.terminal .xterm-bg-color-163 { 
+    background-color: #d700af;
+}
+
+.terminal .xterm-color-164 { 
     color: #d700d7;
 }
 
-.terminal .terminal-color-165 { 
+.terminal .xterm-bg-color-164 { 
+    background-color: #d700d7;
+}
+
+.terminal .xterm-color-165 { 
     color: #d700ff;
 }
 
-.terminal .terminal-color-166 { 
+.terminal .xterm-bg-color-165 { 
+    background-color: #d700ff;
+}
+
+.terminal .xterm-color-166 { 
     color: #d75f00;
 }
 
-.terminal .terminal-color-167 { 
+.terminal .xterm-bg-color-166 { 
+    background-color: #d75f00;
+}
+
+.terminal .xterm-color-167 { 
     color: #d75f5f;
 }
 
-.terminal .terminal-color-168 { 
+.terminal .xterm-bg-color-167 { 
+    background-color: #d75f5f;
+}
+
+.terminal .xterm-color-168 { 
     color: #d75f87;
 }
 
-.terminal .terminal-color-169 { 
+.terminal .xterm-bg-color-168 { 
+    background-color: #d75f87;
+}
+
+.terminal .xterm-color-169 { 
     color: #d75faf;
 }
 
-.terminal .terminal-color-170 { 
+.terminal .xterm-bg-color-169 { 
+    background-color: #d75faf;
+}
+
+.terminal .xterm-color-170 { 
     color: #d75fd7;
 }
 
-.terminal .terminal-color-171 { 
+.terminal .xterm-bg-color-170 { 
+    background-color: #d75fd7;
+}
+
+.terminal .xterm-color-171 { 
     color: #d75fff;
 }
 
-.terminal .terminal-color-172 { 
+.terminal .xterm-bg-color-171 { 
+    background-color: #d75fff;
+}
+
+.terminal .xterm-color-172 { 
     color: #d78700;
 }
 
-.terminal .terminal-color-173 { 
+.terminal .xterm-bg-color-172 { 
+    background-color: #d78700;
+}
+
+.terminal .xterm-color-173 { 
     color: #d7875f;
 }
 
-.terminal .terminal-color-174 { 
+.terminal .xterm-bg-color-173 { 
+    background-color: #d7875f;
+}
+
+.terminal .xterm-color-174 { 
     color: #d78787;
 }
 
-.terminal .terminal-color-175 { 
+.terminal .xterm-bg-color-174 { 
+    background-color: #d78787;
+}
+
+.terminal .xterm-color-175 { 
     color: #d787af;
 }
 
-.terminal .terminal-color-176 { 
+.terminal .xterm-bg-color-175 { 
+    background-color: #d787af;
+}
+
+.terminal .xterm-color-176 { 
     color: #d787d7;
 }
 
-.terminal .terminal-color-177 { 
+.terminal .xterm-bg-color-176 { 
+    background-color: #d787d7;
+}
+
+.terminal .xterm-color-177 { 
     color: #d787ff;
 }
 
-.terminal .terminal-color-178 { 
+.terminal .xterm-bg-color-177 { 
+    background-color: #d787ff;
+}
+
+.terminal .xterm-color-178 { 
     color: #d7af00;
 }
 
-.terminal .terminal-color-179 { 
+.terminal .xterm-bg-color-178 { 
+    background-color: #d7af00;
+}
+
+.terminal .xterm-color-179 { 
     color: #d7af5f;
 }
 
-.terminal .terminal-color-180 { 
+.terminal .xterm-bg-color-179 { 
+    background-color: #d7af5f;
+}
+
+.terminal .xterm-color-180 { 
     color: #d7af87;
 }
 
-.terminal .terminal-color-181 { 
+.terminal .xterm-bg-color-180 { 
+    background-color: #d7af87;
+}
+
+.terminal .xterm-color-181 { 
     color: #d7afaf;
 }
 
-.terminal .terminal-color-182 { 
+.terminal .xterm-bg-color-181 { 
+    background-color: #d7afaf;
+}
+
+.terminal .xterm-color-182 { 
     color: #d7afd7;
 }
 
-.terminal .terminal-color-183 { 
+.terminal .xterm-bg-color-182 { 
+    background-color: #d7afd7;
+}
+
+.terminal .xterm-color-183 { 
     color: #d7afff;
 }
 
-.terminal .terminal-color-184 { 
+.terminal .xterm-bg-color-183 { 
+    background-color: #d7afff;
+}
+
+.terminal .xterm-color-184 { 
     color: #d7d700;
 }
 
-.terminal .terminal-color-185 { 
+.terminal .xterm-bg-color-184 { 
+    background-color: #d7d700;
+}
+
+.terminal .xterm-color-185 { 
     color: #d7d75f;
 }
 
-.terminal .terminal-color-186 { 
+.terminal .xterm-bg-color-185 { 
+    background-color: #d7d75f;
+}
+
+.terminal .xterm-color-186 { 
     color: #d7d787;
 }
 
-.terminal .terminal-color-187 { 
+.terminal .xterm-bg-color-186 { 
+    background-color: #d7d787;
+}
+
+.terminal .xterm-color-187 { 
     color: #d7d7af;
 }
 
-.terminal .terminal-color-188 { 
+.terminal .xterm-bg-color-187 { 
+    background-color: #d7d7af;
+}
+
+.terminal .xterm-color-188 { 
     color: #d7d7d7;
 }
 
-.terminal .terminal-color-189 { 
+.terminal .xterm-bg-color-188 { 
+    background-color: #d7d7d7;
+}
+
+.terminal .xterm-color-189 { 
     color: #d7d7ff;
 }
 
-.terminal .terminal-color-190 { 
+.terminal .xterm-bg-color-189 { 
+    background-color: #d7d7ff;
+}
+
+.terminal .xterm-color-190 { 
     color: #d7ff00;
 }
 
-.terminal .terminal-color-191 { 
+.terminal .xterm-bg-color-190 { 
+    background-color: #d7ff00;
+}
+
+.terminal .xterm-color-191 { 
     color: #d7ff5f;
 }
 
-.terminal .terminal-color-192 { 
+.terminal .xterm-bg-color-191 { 
+    background-color: #d7ff5f;
+}
+
+.terminal .xterm-color-192 { 
     color: #d7ff87;
 }
 
-.terminal .terminal-color-193 { 
+.terminal .xterm-bg-color-192 { 
+    background-color: #d7ff87;
+}
+
+.terminal .xterm-color-193 { 
     color: #d7ffaf;
 }
 
-.terminal .terminal-color-194 { 
+.terminal .xterm-bg-color-193 { 
+    background-color: #d7ffaf;
+}
+
+.terminal .xterm-color-194 { 
     color: #d7ffd7;
 }
 
-.terminal .terminal-color-195 { 
+.terminal .xterm-bg-color-194 { 
+    background-color: #d7ffd7;
+}
+
+.terminal .xterm-color-195 { 
     color: #d7ffff;
 }
 
-.terminal .terminal-color-196 { 
+.terminal .xterm-bg-color-195 { 
+    background-color: #d7ffff;
+}
+
+.terminal .xterm-color-196 { 
     color: #ff0000;
 }
 
-.terminal .terminal-color-197 { 
+.terminal .xterm-bg-color-196 { 
+    background-color: #ff0000;
+}
+
+.terminal .xterm-color-197 { 
     color: #ff005f;
 }
 
-.terminal .terminal-color-198 { 
+.terminal .xterm-bg-color-197 { 
+    background-color: #ff005f;
+}
+
+.terminal .xterm-color-198 { 
     color: #ff0087;
 }
 
-.terminal .terminal-color-199 { 
+.terminal .xterm-bg-color-198 { 
+    background-color: #ff0087;
+}
+
+.terminal .xterm-color-199 { 
     color: #ff00af;
 }
 
-.terminal .terminal-color-200 { 
+.terminal .xterm-bg-color-199 { 
+    background-color: #ff00af;
+}
+
+.terminal .xterm-color-200 { 
     color: #ff00d7;
 }
 
-.terminal .terminal-color-201 { 
+.terminal .xterm-bg-color-200 { 
+    background-color: #ff00d7;
+}
+
+.terminal .xterm-color-201 { 
     color: #ff00ff;
 }
 
-.terminal .terminal-color-202 { 
+.terminal .xterm-bg-color-201 { 
+    background-color: #ff00ff;
+}
+
+.terminal .xterm-color-202 { 
     color: #ff5f00;
 }
 
-.terminal .terminal-color-203 { 
+.terminal .xterm-bg-color-202 { 
+    background-color: #ff5f00;
+}
+
+.terminal .xterm-color-203 { 
     color: #ff5f5f;
 }
 
-.terminal .terminal-color-204 { 
+.terminal .xterm-bg-color-203 { 
+    background-color: #ff5f5f;
+}
+
+.terminal .xterm-color-204 { 
     color: #ff5f87;
 }
 
-.terminal .terminal-color-205 { 
+.terminal .xterm-bg-color-204 { 
+    background-color: #ff5f87;
+}
+
+.terminal .xterm-color-205 { 
     color: #ff5faf;
 }
 
-.terminal .terminal-color-206 { 
+.terminal .xterm-bg-color-205 { 
+    background-color: #ff5faf;
+}
+
+.terminal .xterm-color-206 { 
     color: #ff5fd7;
 }
 
-.terminal .terminal-color-207 { 
+.terminal .xterm-bg-color-206 { 
+    background-color: #ff5fd7;
+}
+
+.terminal .xterm-color-207 { 
     color: #ff5fff;
 }
 
-.terminal .terminal-color-208 { 
+.terminal .xterm-bg-color-207 { 
+    background-color: #ff5fff;
+}
+
+.terminal .xterm-color-208 { 
     color: #ff8700;
 }
 
-.terminal .terminal-color-209 { 
+.terminal .xterm-bg-color-208 { 
+    background-color: #ff8700;
+}
+
+.terminal .xterm-color-209 { 
     color: #ff875f;
 }
 
-.terminal .terminal-color-210 { 
+.terminal .xterm-bg-color-209 { 
+    background-color: #ff875f;
+}
+
+.terminal .xterm-color-210 { 
     color: #ff8787;
 }
 
-.terminal .terminal-color-211 { 
+.terminal .xterm-bg-color-210 { 
+    background-color: #ff8787;
+}
+
+.terminal .xterm-color-211 { 
     color: #ff87af;
 }
 
-.terminal .terminal-color-212 { 
+.terminal .xterm-bg-color-211 { 
+    background-color: #ff87af;
+}
+
+.terminal .xterm-color-212 { 
     color: #ff87d7;
 }
 
-.terminal .terminal-color-213 { 
+.terminal .xterm-bg-color-212 { 
+    background-color: #ff87d7;
+}
+
+.terminal .xterm-color-213 { 
     color: #ff87ff;
 }
 
-.terminal .terminal-color-214 { 
+.terminal .xterm-bg-color-213 { 
+    background-color: #ff87ff;
+}
+
+.terminal .xterm-color-214 { 
     color: #ffaf00;
 }
 
-.terminal .terminal-color-215 { 
+.terminal .xterm-bg-color-214 { 
+    background-color: #ffaf00;
+}
+
+.terminal .xterm-color-215 { 
     color: #ffaf5f;
 }
 
-.terminal .terminal-color-216 { 
+.terminal .xterm-bg-color-215 { 
+    background-color: #ffaf5f;
+}
+
+.terminal .xterm-color-216 { 
     color: #ffaf87;
 }
 
-.terminal .terminal-color-217 { 
+.terminal .xterm-bg-color-216 { 
+    background-color: #ffaf87;
+}
+
+.terminal .xterm-color-217 { 
     color: #ffafaf;
 }
 
-.terminal .terminal-color-218 { 
+.terminal .xterm-bg-color-217 { 
+    background-color: #ffafaf;
+}
+
+.terminal .xterm-color-218 { 
     color: #ffafd7;
 }
 
-.terminal .terminal-color-219 { 
+.terminal .xterm-bg-color-218 { 
+    background-color: #ffafd7;
+}
+
+.terminal .xterm-color-219 { 
     color: #ffafff;
 }
 
-.terminal .terminal-color-220 { 
+.terminal .xterm-bg-color-219 { 
+    background-color: #ffafff;
+}
+
+.terminal .xterm-color-220 { 
     color: #ffd700;
 }
 
-.terminal .terminal-color-221 { 
+.terminal .xterm-bg-color-220 { 
+    background-color: #ffd700;
+}
+
+.terminal .xterm-color-221 { 
     color: #ffd75f;
 }
 
-.terminal .terminal-color-222 { 
+.terminal .xterm-bg-color-221 { 
+    background-color: #ffd75f;
+}
+
+.terminal .xterm-color-222 { 
     color: #ffd787;
 }
 
-.terminal .terminal-color-223 { 
+.terminal .xterm-bg-color-222 { 
+    background-color: #ffd787;
+}
+
+.terminal .xterm-color-223 { 
     color: #ffd7af;
 }
 
-.terminal .terminal-color-224 { 
+.terminal .xterm-bg-color-223 { 
+    background-color: #ffd7af;
+}
+
+.terminal .xterm-color-224 { 
     color: #ffd7d7;
 }
 
-.terminal .terminal-color-225 { 
+.terminal .xterm-bg-color-224 { 
+    background-color: #ffd7d7;
+}
+
+.terminal .xterm-color-225 { 
     color: #ffd7ff;
 }
 
-.terminal .terminal-color-226 { 
+.terminal .xterm-bg-color-225 { 
+    background-color: #ffd7ff;
+}
+
+.terminal .xterm-color-226 { 
     color: #ffff00;
 }
 
-.terminal .terminal-color-227 { 
+.terminal .xterm-bg-color-226 { 
+    background-color: #ffff00;
+}
+
+.terminal .xterm-color-227 { 
     color: #ffff5f;
 }
 
-.terminal .terminal-color-228 { 
+.terminal .xterm-bg-color-227 { 
+    background-color: #ffff5f;
+}
+
+.terminal .xterm-color-228 { 
     color: #ffff87;
 }
 
-.terminal .terminal-color-229 { 
+.terminal .xterm-bg-color-228 { 
+    background-color: #ffff87;
+}
+
+.terminal .xterm-color-229 { 
     color: #ffffaf;
 }
 
-.terminal .terminal-color-230 { 
+.terminal .xterm-bg-color-229 { 
+    background-color: #ffffaf;
+}
+
+.terminal .xterm-color-230 { 
     color: #ffffd7;
 }
 
-.terminal .terminal-color-231 { 
+.terminal .xterm-bg-color-230 { 
+    background-color: #ffffd7;
+}
+
+.terminal .xterm-color-231 { 
     color: #ffffff;
 }
 
-.terminal .terminal-color-232 { 
+.terminal .xterm-bg-color-231 { 
+    background-color: #ffffff;
+}
+
+.terminal .xterm-color-232 { 
     color: #080808;
 }
 
-.terminal .terminal-color-233 { 
+.terminal .xterm-bg-color-232 { 
+    background-color: #080808;
+}
+
+.terminal .xterm-color-233 { 
     color: #121212;
 }
 
-.terminal .terminal-color-234 { 
+.terminal .xterm-bg-color-233 { 
+    background-color: #121212;
+}
+
+.terminal .xterm-color-234 { 
     color: #1c1c1c;
 }
 
-.terminal .terminal-color-235 { 
+.terminal .xterm-bg-color-234 { 
+    background-color: #1c1c1c;
+}
+
+.terminal .xterm-color-235 { 
     color: #262626;
 }
 
-.terminal .terminal-color-236 { 
+.terminal .xterm-bg-color-235 { 
+    background-color: #262626;
+}
+
+.terminal .xterm-color-236 { 
     color: #303030;
 }
 
-.terminal .terminal-color-237 { 
+.terminal .xterm-bg-color-236 { 
+    background-color: #303030;
+}
+
+.terminal .xterm-color-237 { 
     color: #3a3a3a;
 }
 
-.terminal .terminal-color-238 { 
+.terminal .xterm-bg-color-237 { 
+    background-color: #3a3a3a;
+}
+
+.terminal .xterm-color-238 { 
     color: #444444;
 }
 
-.terminal .terminal-color-239 { 
+.terminal .xterm-bg-color-238 { 
+    background-color: #444444;
+}
+
+.terminal .xterm-color-239 { 
     color: #4e4e4e;
 }
 
-.terminal .terminal-color-240 { 
+.terminal .xterm-bg-color-239 { 
+    background-color: #4e4e4e;
+}
+
+.terminal .xterm-color-240 { 
     color: #585858;
 }
 
-.terminal .terminal-color-241 { 
+.terminal .xterm-bg-color-240 { 
+    background-color: #585858;
+}
+
+.terminal .xterm-color-241 { 
     color: #626262;
 }
 
-.terminal .terminal-color-242 { 
+.terminal .xterm-bg-color-241 { 
+    background-color: #626262;
+}
+
+.terminal .xterm-color-242 { 
     color: #6c6c6c;
 }
 
-.terminal .terminal-color-243 { 
+.terminal .xterm-bg-color-242 { 
+    background-color: #6c6c6c;
+}
+
+.terminal .xterm-color-243 { 
     color: #767676;
 }
 
-.terminal .terminal-color-244 { 
+.terminal .xterm-bg-color-243 { 
+    background-color: #767676;
+}
+
+.terminal .xterm-color-244 { 
     color: #808080;
 }
 
-.terminal .terminal-color-245 { 
+.terminal .xterm-bg-color-244 { 
+    background-color: #808080;
+}
+
+.terminal .xterm-color-245 { 
     color: #8a8a8a;
 }
 
-.terminal .terminal-color-246 { 
+.terminal .xterm-bg-color-245 { 
+    background-color: #8a8a8a;
+}
+
+.terminal .xterm-color-246 { 
     color: #949494;
 }
 
-.terminal .terminal-color-247 { 
+.terminal .xterm-bg-color-246 { 
+    background-color: #949494;
+}
+
+.terminal .xterm-color-247 { 
     color: #9e9e9e;
 }
 
-.terminal .terminal-color-248 { 
+.terminal .xterm-bg-color-247 { 
+    background-color: #9e9e9e;
+}
+
+.terminal .xterm-color-248 { 
     color: #a8a8a8;
 }
 
-.terminal .terminal-color-249 { 
+.terminal .xterm-bg-color-248 { 
+    background-color: #a8a8a8;
+}
+
+.terminal .xterm-color-249 { 
     color: #b2b2b2;
 }
 
-.terminal .terminal-color-250 { 
+.terminal .xterm-bg-color-249 { 
+    background-color: #b2b2b2;
+}
+
+.terminal .xterm-color-250 { 
     color: #bcbcbc;
 }
 
-.terminal .terminal-color-251 { 
+.terminal .xterm-bg-color-250 { 
+    background-color: #bcbcbc;
+}
+
+.terminal .xterm-color-251 { 
     color: #c6c6c6;
 }
 
-.terminal .terminal-color-252 { 
+.terminal .xterm-bg-color-251 { 
+    background-color: #c6c6c6;
+}
+
+.terminal .xterm-color-252 { 
     color: #d0d0d0;
 }
 
-.terminal .terminal-color-253 { 
+.terminal .xterm-bg-color-252 { 
+    background-color: #d0d0d0;
+}
+
+.terminal .xterm-color-253 { 
     color: #dadada;
 }
 
-.terminal .terminal-color-254 { 
+.terminal .xterm-bg-color-253 { 
+    background-color: #dadada;
+}
+
+.terminal .xterm-color-254 { 
     color: #e4e4e4;
 }
 
-.terminal .terminal-color-255 { 
+.terminal .xterm-bg-color-254 { 
+    background-color: #e4e4e4;
+}
+
+.terminal .xterm-color-255 { 
     color: #eeeeee;
+}
+
+.terminal .xterm-bg-color-255 { 
+    background-color: #eeeeee;
 }
\ No newline at end of file
index 0a9a035ef3cad575daf45aada6affaba92ffb236..cf2604f4c913b8e7555c0abc3a8662a880db9ca3 100644 (file)
@@ -363,6 +363,7 @@ Terminal.vcolors = (function() {
 
 Terminal.defaults = {
   colors: Terminal.colors,
+  theme: 'default',
   convertEol: false,
   termName: 'xterm',
   geometry: [80, 24],
@@ -372,7 +373,6 @@ Terminal.defaults = {
   scrollback: 1000,
   screenKeys: false,
   debug: false,
-  useStyle: false,
   cancelEvents: false
   // programFeatures: false,
   // focusKeys: false,
@@ -452,10 +452,6 @@ Terminal.prototype.initGlobal = function() {
   if (this.isIpad || this.isIphone) {
     Terminal.fixIpad(document);
   }
-
-  if (this.useStyle) {
-    Terminal.insertStyle(document, this.colors[256], this.colors[257]);
-  }
 };
 
 /**
@@ -603,52 +599,6 @@ Terminal.fixIpad = function(document) {
   }, 1000);
 };
 
-/**
- * Insert a default style
- */
-
-Terminal.insertStyle = function(document, bg, fg) {
-  var style = document.getElementById('term-style');
-  if (style) return;
-
-  var head = document.getElementsByTagName('head')[0];
-  if (!head) return;
-
-  var style = document.createElement('style');
-  style.id = 'term-style';
-
-  // textContent doesn't work well with IE for <style> elements.
-  style.innerHTML = ''
-    + '.terminal {\n'
-    + '  float: left;\n'
-    + '  border: ' + bg + ' solid 5px;\n'
-    + '  font-family: "DejaVu Sans Mono", "Liberation Mono", monospace;\n'
-    + '  font-size: 11px;\n'
-    + '  color: ' + fg + ';\n'
-    + '  background: ' + bg + ';\n'
-    + '}\n'
-    + '\n'
-    + '.terminal-cursor {\n'
-    + '  color: ' + bg + ';\n'
-    + '  background: ' + fg + ';\n'
-    + '}\n';
-
-  // var out = '';
-  // each(Terminal.colors, function(color, i) {
-  //   if (i === 256) {
-  //     out += '\n.term-bg-color-default { background-color: ' + color + '; }';
-  //   }
-  //   if (i === 257) {
-  //     out += '\n.term-fg-color-default { color: ' + color + '; }';
-  //   }
-  //   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);
-};
-
 /**
  * Open Terminal
  */
@@ -680,6 +630,7 @@ Terminal.prototype.open = function(parent) {
   // Create our main terminal element.
   this.element = this.document.createElement('div');
   this.element.className = 'terminal';
+  this.element.classList.add('xterm-theme-' + this.theme);
   this.element.setAttribute('tabindex', 0);
 
   // Create the lines for our terminal.
@@ -1194,7 +1145,7 @@ Terminal.prototype.refresh = function(start, end) {
           if (data === -1) {
             out += '<span class="reverse-video terminal-cursor">';
           } else {
-            out += '<span style="';
+            out += '<span class="';
 
             bg = data & 0x1ff;
             fg = (data >> 9) & 0x1ff;
@@ -1203,7 +1154,7 @@ Terminal.prototype.refresh = function(start, end) {
             // bold
             if (flags & 1) {
               if (!Terminal.brokenBold) {
-                out += 'font-weight:bold;';
+                out += ' xterm-bold ';
               }
               // See: XTerm*boldColors
               if (fg < 8) fg += 8;
@@ -1211,17 +1162,12 @@ Terminal.prototype.refresh = function(start, end) {
 
             // underline
             if (flags & 2) {
-              out += 'text-decoration:underline;';
+              out += ' xterm-underline ';
             }
 
             // blink
             if (flags & 4) {
-              if (flags & 2) {
-                out = out.slice(0, -1);
-                out += ' blink;';
-              } else {
-                out += 'text-decoration:blink;';
-              }
+                out += ' xterm-blink ';
             }
 
             // inverse
@@ -1235,7 +1181,7 @@ Terminal.prototype.refresh = function(start, end) {
 
             // invisible
             if (flags & 16) {
-              out += 'visibility:hidden;';
+              out += ' xterm-hidden ';
             }
 
             // out += '" class="'
@@ -1245,15 +1191,11 @@ Terminal.prototype.refresh = function(start, end) {
             //   + '">';
 
             if (bg !== 256) {
-              out += 'background-color:'
-                + this.colors[bg]
-                + ';';
+              out += ' xterm-bg-color-' + bg + ' ';
             }
 
             if (fg !== 257) {
-              out += 'color:'
-                + this.colors[fg]
-                + ';';
+              out += ' xterm-color-' + fg + ' ';
             }
 
             out += '">';
@@ -1287,7 +1229,7 @@ Terminal.prototype.refresh = function(start, end) {
     if (attr !== this.defAttr) {
       out += '</span>';
     }
-
+    
     this.children[y].innerHTML = out;
   }