-
Notifications
You must be signed in to change notification settings - Fork 93
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
Need to exclude some rules from Pynliner #37
Comments
That's an interesting thing I hadn't considered up till now. We can Options off the top of my head are:
Thoughts? On Fri, Jan 16, 2015, 12:06 PM Andy Baker [email protected] wrote:
|
In my case I feel it belongs in the template - as it's probably template specific and the app with the template is a different app to the app that calls pynliner. Also - might specifying selectors be a bit verbose? There might be lots of them (potentially)... Maybe something like conditional comments? Either outside the styles:
inside:
Final idea. Use a valid attribute on the style tag itself. Maybe a data-*:
|
Of what's been mentioned so far I like the data attribute the best. It's On Fri, Jan 16, 2015, 1:06 PM Andy Baker [email protected] wrote:
|
+1 to the data attribute way |
Why not ignore unused selectors altogether? I don't see the benefit to erring out when a selector isn't found in the html. I have a set of email templates that each have different mildly different structures. I also have a set of SASS files I'd like to share between our website and emails. Spreading the styles across each template is gross, unmaintainable, and forces me into the CSS land. It's so much cleaner to throw the SASS through its compiler, and then use something to inline the styles. I expect some of the styles to be unused sometimes. Why be so strict? |
Related to #13
There are some rules we use as fixes for crappy web email clients. For example:
Targets the email when it's displayed within Hotmail/Outlook.com (see http://templates.mailchimp.com/development/css/client-specific-styles/ )
It would be useful to have a way to mark some CSS rules to be ignored by pynliner. For now I can mark that block myself - remove it pre-pynliner and then add it back in afterwards.
But seems like a general solution to this would be a good feature.
The text was updated successfully, but these errors were encountered: