Codemirror.net has lots of themes besides the dark theme in current dev tools (now Fx 74). The "instructions" how to add / use one :D are more towards if CM is a free sta…
Codemirror.net has lots of themes besides the dark theme in current dev tools (now Fx 74). The "instructions" how to add / use one :D are more towards if CM is a free standing editor, rather than if codemirror is embedded in a browser.
"Up to a certain extent, CodeMirror's look can be changed by modifying style sheet files. The style sheets supplied by modes simply provide the colors for that mode, and can be adapted in a very *straightforward* way. Well....
"To style the editor itself, it is possible to ALTER or override the styles defined in codemirror.css."
Continuing: "The easiest way to use CodeMirror is to simply load the script and style sheet found under lib/ in the distribution, plus a mode script from one of the mode/ directories. For example:
The only problem is, I can't find a detailed enough example (only ones like the college engineering professors worked, leaving out several key steps).
There weren't many posts in their community about how to make it use another theme than the Default, that's inside of codemirror.css in omni.ja. A guy answering a question about this referenced the theme demo page, showing different themes on code. Said maybe you can read the source files for the demo page. I read it, but I'm not sure it's applicable when embedded in Fx.
I've searched a lot how to do it & there's not much info. Honestly, unless someone advanced enough to look at their instructions could simplify it, it's possible the fastest way is change the default theme colors in codemirror.css, then repack omni.ja. Codemirror mentions that method, but again, I think they're talking if it's freestanding or backend for some text editor, not embedded in a browser.
I'm not sure userChrome will work because it's not really part of Fx. At least I couldn't get it to work, putting the theme code in userChrome (either the normal or /chrome_debugger_profile/chrome). Though some people change some things in devtools using userChrome.css. It breaks when Mozilla changes anything.
The very few things I had tweaked in CM / dev tools UI, stopped working in Fx 74. Nothing I could do - a new profile, new userChrome file, copying a few rules - ever made it work in Fx 74. Most of what I found was people having a hard time changing devtools UI (in Fx or Chrome) w/ any consistency.