lookback / meteor-emails

Improved Meteor emails with templating, previews and automated CSS/SCSS inlining.

Home Page:https://atmospherejs.com/lookback/emails

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Troubleshooting CSS Issues

bduff9 opened this issue · comments

I am running into a couple of strange CSS related issues I cannot pinpoint. The current issue is that I am trying to import bootstrap v4 into my emails scss using the @import directive. This did work in bootstrap v4-alpha but now fails. There are 3 specific places it is failing and I tried looking into the issue but they don't make much sense. The 3 errors I get from 3 different files are:
Could not add CSS to emailLayout: Unmatched ' (line 2551, char 253) mailer-utils
Could not add CSS to emailLayout: Unexpected } (line 3307, char 42) mailer-utils
Could not add CSS to emailLayout: Unexpected } (line 3974, char 22) mailer-utils

...however, the first file, for instance, has no single quotes in it. I see in utils.js where you are logging this message, however I am unsure how to actually troubleshoot further to actually see what the issue may be. Is there a debug mode or something that would provide more information to me other than the cryptic lines above?

Hm, are you using SCSS or pure CSS for this project? Looks like some kind of syntax error in the CSS, but it might be SCSS that's not compiled properly. Remember that node-sass is opt-in:

meteor npm install --save node-sass

I am using SCSS. As I said, this is complaining on Bootstrap's scss files (3 of them, to be specific) which compile just fine outside of emails. Its only when used in emails that I see the above errors. I have been using bootstrap 4 just fine in my emails, this comes after I updated both this package as well as bootstrap 4 (from alpha to beta).