Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom themes can't be compiled from 1.0.8 #326

Closed
davidsharp opened this issue Nov 10, 2017 · 6 comments
Closed

Custom themes can't be compiled from 1.0.8 #326

davidsharp opened this issue Nov 10, 2017 · 6 comments

Comments

@davidsharp
Copy link

Since updating to 1.0.8, my custom themes fail to compile, as the base colour variables are missing (variable @gray is undefined). While this is a problem that could be fixed in my theme by setting those variables myself, this will also affect everyone using the nylas-mail-theme-starter, which is still the canonical basis for themes.

screen shot 2017-11-10 at 12 34 30

Because it causes a JS error, it also means I can't get far enough to be able to change the theme through the UI.

@AvexiMatt
Copy link

A quick work around to get it working on a different theme,
Load the config.json file
C:\Users<Username>\AppData\Roaming\Mailspring

and change
the Theme to something like this
"theme": "ui-light"

@bengotow
Copy link
Collaborator

Hey! Sorry for the hassle—didn't realize there were custom themes floating around already!

To fix the theme, you probably just need to add this line to the top of the mailsprung/ui-variables.less file. We changed a few things and it no longer assumes you want to use the base variables file!

@import 'base/ui-variables';

@davidsharp
Copy link
Author

Cool, that's fixed it. I definitely think it makes more sense for the import to be explicit, but I wasn't initially sure where those variables were coming from. 👍

@opes
Copy link

opes commented Dec 1, 2017

@bengotow I'm working on porting over the Material theme that was available for Nylas and ran into this issue. When I import the base/ui-variables, it fixes the aforementioned errors, but the colors are completely different than what I have specified. Are there more complexities that need to be addressed aside from what's stated here and in the migration guide?

Love the work you're doing on Mailspring, by the way. Looking forward to contributing to the project!

EDIT: Looks like the issues that I was facing were related to a bad cache. Clearing out the compile-cache from ~/Application Support/Mailspring seems to have fixed it.

@bengotow
Copy link
Collaborator

Hey @opes - hmm interesting, thanks for letting me know it didn't work right off the bat. Basically what we're doing is 1) making it so that LESS files have to include ui-variables to reference / use them and 2) requiring that themes that want to modify ui-variables define their own version of the file that overrides values from the base theme (base/ui-variables).

Sorry it's kind of a messy migration... before, we were including all the base variables, followed by all your theme LESS, followed by the LESS we wanted to compile for every file, which was crazy slow and meant that sometimes weird things could happen because things were in your LESS scope you didn't explicitly ask for.

Let me know if you got Material working!

@edipox
Copy link
Contributor

edipox commented Feb 18, 2018

Hi everyone!
Ido is working on Mailspring 1.1.4 now 😄

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

No branches or pull requests

5 participants