Comments (8)
This should be included in a separate stylesheet that does not get included at all. Perhaps I could make Roadie output a warning when this happens, but making it more explicit in the README would probably be a good idea.
from roadie.
This is now part of the README. I'll close this issue now.
from roadie.
What about roadie ignoring media queries while parsing and working its magic? That way the specific styles will still be included in the final email for situations when the user is not connected to the internet, but still viewing the email on their phone.
Actually, I just saw the data-immutable bit in the source. Could including that attribute inline work as well?
<style>
// Some stuff
</style>
<style data-immutable>
// media queries here
</style>
from roadie.
It should work even on <style> elements, yes.
Since the original CSS is removed from the email, it is impossible to just ignore the media queries and apply them later.
from roadie.
Looks like there's a bug in the android client. I was writing that it should work for style elements.
from roadie.
@Mange I've just started with rails and i'm using roadie for instyling in email, but whenever i send a mail its only showing my mobile view. I have put my media queries in separate files as you mentioned but still its not working and one more thing, you mentioned how to ignore stylesheet using null provider in read me file, but as a noob i dont know where exactly to put this into, so can you pls specify it. :)
from roadie.
@mandeep05 You probably read the new README for the 3.0 branch that still isn't released. For that reason, you are most likely not using the correct attributes to ignore the stylesheets.
Take a look at the README for the 2.4 branch instead.
I should perhaps make the Note at the top more readable.
from roadie.
Sorry, it's hard to know the cause for your problems from this short
description.
We're also discussing in an inappropriate place. Please open up another
issue and let's discuss there.
In the mean time I would suggest that you start slow with a minimal set of
styles an then work your way up. You can detect errors faster when they
occur.
Also note that most email clients will not support media queries or any
other advanced features. You could google a list of clients that support
media queries and see if that matches.
Most client will not load external stylesheets either and only apply styles
that are inlined.
All in all, use stylesheets like you were working with IE5.5 or Netscape
navigator. :-(
Magnus
Den tisdagen den 29:e oktober 2013 skrev Mandeep:
@Mange https://github.com/Mange thanks but now i have a different
problem, its not applying all the css inline only some of it is inline.
It's as if css is cached somewhere, because even when i'm doing changes in
css file, those changes are visible in development but in email they
aren't. Secondly its not applying my media-queries if a user check email in
phone. Any suggestions?—
Reply to this email directly or view it on GitHubhttps://github.com//issues/20#issuecomment-27309636
.
from roadie.
Related Issues (20)
- undefined method `children' for nil:NilClass HOT 13
- Support css_parser 1.4.x HOT 2
- Support Outlook's approach to margins HOT 2
- Media queries inlined HOT 9
- Roadie is erratically causing emails to be encoded differently HOT 3
- New release supporting Nokogiri 1.7? HOT 2
- Weird issue with content: '•'; in my CSS HOT 4
- Convert rem to px? HOT 1
- Allow anchor tags to be ignored HOT 3
- nokogiri is locked to 1.7.x, 1.8.x is out. HOT 5
- css_parser is locked to 1.4.x, 1.5.x is out HOT 6
- Add support for storing the document as XHTML HOT 3
- Stylesheet BOM stripping doesn't work with NetHttpProvider HOT 8
- support anchor/ image url stripping inside conditional tags HOT 5
- Image style attributes - Outlook (on windows) special cases HOT 1
- Transformation Hooks - readme out of date HOT 2
- [Announcement] Passive maintenance mode HOT 6
- Roadie output mangled when control chars are present in conditional comments HOT 1
- NoMethodError Exception: undefined method `match' for #<Hash:0x00000000062ecdf8> HOT 3
- Support CSS custom properties (variables) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from roadie.