leemunroe / grunt-email-workflow

A Grunt workflow for designing and testing responsive HTML email templates with SCSS.

Repository from Github https://github.comleemunroe/grunt-email-workflowRepository from Github https://github.comleemunroe/grunt-email-workflow

support specific style file for different layout

irvin opened this issue · comments

It's easy to add new layout, but I don't find a way to assign different style for each layouts, that make it difficult to manage multiple functional email in one place.

commented

Hey @irvin

We've got your back - it's setup to support as many unique or shared styles as you'd like.

  1. Create a new scss filesrc/css/scss/layout_b.scss for example. @import whatever shared styles or unique styles you'd like.
  2. Edit grunt/sass.js and add reference to your new scss file.
files: {
    '<%= paths.src %>/css/main.css': '<%= paths.src %>/css/scss/main.scss',
    '<%= paths.src %>/css/layout_b.css': '<%= paths.src %>/css/scss/layout_b.scss'
}
  1. Create your new layout src/layouts/layout_b.hbs and change the stylesheet reference.
<link href="../src/css/layout_b.css" media="all" rel="stylesheet" type="text/css" />

Thanks a lot!

I think this may go into document?