Closed Bug 924878 Opened 11 years ago Closed 11 years ago

codemirror.css should be in skin, not in content

Categories

(DevTools :: Source Editor, defect, P3)

x86_64
Windows 7
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: alfredkayser, Unassigned)

References

Details

      No description provided.
Is this actually really needed? Afaik, nobody ever built themes for Orion.


But I imagine it doesn't cost much to move the files to /themes/shared/.
Are there any advantages of putting CSS files into /themes/ besides customization? I'd like CodeMirror to not be customizable at least for the initial release and until we flesh out all the kinks.
Flags: needinfo?(alfredkayser)
(In reply to Anton Kovalyov (:anton) from comment #3)
> Are there any advantages of putting CSS files into /themes/ besides
> customization? I'd like CodeMirror to not be customizable at least for the
> initial release and until we flesh out all the kinks.

Not really. I agree with you, for the moment, we should favor self-contained + maintainable code over customization.
Component: Developer Tools: Scratchpad → Developer Tools: Source Editor
A solution for me would to also include a chrome://browser/skin/devtools/codemirror.css, initially empty, so that themers can at least provide overriding style rules when needed.

Examples where this is needed are my themes, particulary Walnut and Walnut2 where the grey linenumbers column just doesn't fit the Walnut style.

See also the documentation on the CodeMirror site, where one of the key advantages mentioned is the style customizability of CodeMirror.

Right now there is there no way that a theme can adjust styling of the CodeMirror based scratchpad.
Flags: needinfo?(alfredkayser)
Not in scope for first release but definitely something we can do once we've stabilized. Thanks!
Priority: -- → P3
This is more or less solved by: Bug 895561 - "Edit As HTML" option in the markup view,
by adding the common.css into the codemirror context, so that now themers can apply their own styling on top of the CodeMirror style.

 const CM_STYLES   = [
+  "chrome://browser/skin/devtools/common.css",
   "chrome://browser/content/devtools/codemirror/codemirror.css",
   "chrome://browser/content/devtools/codemirror/dialog.css",
   "chrome://browser/content/devtools/codemirror/mozilla.css"
 ];
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.