Permalink
Browse files

It looks like using @import doesn't work properly with SourceEditor t…

…hemes, related to Issue 5488
  • Loading branch information...
1 parent 817d130 commit cb06e5572963236618e568ec252de19e4adf2eb0 @janodvarko janodvarko committed May 21, 2012
Showing with 18 additions and 6 deletions.
  1. +8 −1 extension/content/firebug/console/commandEditor.js
  2. +10 −5 extension/skin/classic/orion-firebug.css
@@ -62,7 +62,7 @@ Firebug.CommandEditor = Obj.extend(Firebug.Module,
{
mode: MODE_JAVASCRIPT,
showLineNumbers: false,
- theme: "chrome://firebug/skin/orion-firebug.css"
+ //theme: "chrome://firebug/skin/orion-firebug.css"
};
// Custom shortcuts for Orion editor
@@ -116,6 +116,13 @@ Firebug.CommandEditor = Obj.extend(Firebug.Module,
// This event is not supported in Fx11 so, catch the exception
// which is thrown.
this.editor.addEventListener("keypress", this.onKeyPress);
+
+ // Customize the default theme. Source Editor component doesn't have public
+ // API for customizing existing themes. So, use this construct, but be aware
+ // that _view and _frameDocument are private variables and could change.
+ // See: https://bugzilla.mozilla.org/show_bug.cgi?id=757016
+ var editorDoc = this.editor._view._frameDocument;
+ Css.appendStylesheet(editorDoc, "chrome://firebug/skin/orion-firebug.css");
}
catch (err)
{
@@ -3,22 +3,27 @@
/************************************************************************************************/
/* The Default Mozilla Orion Theme */
-@import "chrome://browser/skin/devtools/orion.css";
+/* From some reason, importing the default theme this way causes issue 5488 */
+/*@import "chrome://browser/skin/devtools/orion.css";*/
/************************************************************************************************/
/* Custom Styles for Command Editor (Orion) */
+.viewContainer {
+ font-size: 11px;
+}
+
.view {
- background: white;
+ background: white;
}
.token_string {
- color: red;
- font-style: normal;
+ color: red;
+ font-style: normal;
}
.token_keyword {
- color: blue;
+ color: blue;
}
/************************************************************************************************/

0 comments on commit cb06e55

Please sign in to comment.