Skip to content

Add support for setting a custom theme + add GitHub theme option.#98

Open
grafluxe wants to merge 3 commits intogruehle:masterfrom
grafluxe:master
Open

Add support for setting a custom theme + add GitHub theme option.#98
grafluxe wants to merge 3 commits intogruehle:masterfrom
grafluxe:master

Conversation

@grafluxe
Copy link
Copy Markdown

Changelog:

Copy link
Copy Markdown
Owner

@gruehle gruehle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@grafluxe Thank you for the pull request! The bug fix and Github theme are awesome. I like the idea of a custom theme, but have a few comments that need to be addressed before it can be merged.

@@ -0,0 +1,688 @@
/* https://github.com/sindresorhus/github-markdown-css */

@font-face {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This font-face is not used and should be removed.

function setCustomTheme() {
_hideSettings();

Dialogs.showModalDialog(
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This dialog is not necessary. Selecting the 'Custom' theme should go directly to the file system open dialog.

# Markdown Preview

A [Brackets](https://github.com/adobe/brackets) extension that provides a live preview of markdown documents.
Forked from <https://github.com/gruehle/MarkdownPreview>
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line should be removed.

}

if (fi.length === 1) {
_prefs.set("theme", "custom");
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once a custom theme is set, there is no way to change it to a different theme (short of renaming the file to force a reset). There should be a way to switch to a different CSS file.

Here is one possible suggestion: keep the Custom menu item, but add a new menu item whenever a custom CSS file is selected. This way the theme menu is populated with all of the built-in themes, and all themes selected by the user. If you do this, the Custom menu item should have an ellipses at the end.

@grafluxe
Copy link
Copy Markdown
Author

Thanks @gruehle, I'll review and update once I have some time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants