Scope CodeMirror css styles in a theme #3351

Closed
MiguelCastillo opened this Issue Apr 5, 2013 · 7 comments

5 participants

@MiguelCastillo
Adobe Systems Incorporated member

A few css definitions are set as global styles rather than part of a theme; perhaps a brackets theme. For example,

From:
.CodeMirror-focused .CodeMirror-activeline-background

To:
.cm-s-brackets.CodeMirror-focused .CodeMirror-activeline-background

From:
.CodeMirror-scroll

To:
.cm-s-brackets.CodeMirror-scroll

You can set codemirror instances to be created with "brackets" as the default theme with:
CodeMirror.defaults.theme = "brackets";

This is just more friendly for people (like myself) trying to take advantage of CodeMirrors themes.

@pthiess
Adobe Systems Incorporated member

Hey Miguel,

this sounds like a valuable idea. Could you imagine to put up a pull request or outline the tasks necessary to perform the changes as we use to do for a user story. We'd like to prioritize this as a community contribution.

Thanks a ton,
Peter :)

@pthiess
Adobe Systems Incorporated member

@MiguelCastillo - Please send us your feedback to my request above.

@MiguelCastillo
Adobe Systems Incorporated member

Hi Peter, I am really sorry I never responded... I had no idea you had commented on this request. :(

Yes, I will be happy to make a pull request, absolutely. Let me put something together and you will hear from me soon.

-Miguel

@redmunds

This issue is unassigned, so marking "Needs Review".

@njx njx added low priority and removed needs review labels Apr 1, 2014
@ingorichter ingorichter was assigned by njx Apr 1, 2014
@njx
Adobe Systems Incorporated member
njx commented Apr 1, 2014

@MiguelCastillo - sorry we haven't looked at this issue in awhile. Is it still relevant? If so, would you still be up for putting up a pull request with a proposal for how the core code should be changed to support theming better?

Assigning to @ingorichter, low pri, to track the issue.

@MiguelCastillo
Adobe Systems Incorporated member

@njx Yeah I know its an old issue, sorry I never got back to this...

So, two things.
1. I am hoping this will go away when this is implemented https://trello.com/c/y5ed9WKY/460-3-theme-support
2. I added some default css overrides that address the issue in my Themes extension.

So, this issue isn't really as relevant anymore.

I will be happy to help move the whole Themes part of Brackets forward though. Let me know how I can help!

@njx
Adobe Systems Incorporated member
njx commented Apr 1, 2014

Yup, we definitely want to have themes in the core eventually, so we might want to use one of the existing extensions as a starting point.

It sounds like this change is no longer necessary, so I'll close the issue. If it would make things significantly cleaner for your extension, though, and you feel like putting up a PR for it at some point, we'd definitely take a look at it. Thanks.

@njx njx closed this Apr 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment