Skip to main content
January 19, 2009
Question

A Call for Extensions We'll Pay For

  • January 19, 2009
  • 2 replies
  • 757 views
I'll Start. How about an extension that will take CSS styles (internal or external) and place them inline with the HTML code wherever said style(s) are being referenced. This would be enormously helpful for coding HTML emails.

If this already exists somewhere, please let me know.
This topic has been closed for replies.

2 replies

Inspiring
January 22, 2009
You can also include the css in the head of your email rather than replace with inline styles. There are a number of ways to accomplish this server side depending on how you are sending out the email.

Reading the prior link to the wordpress plugin, I can say that I have used css in the head of the email source without much trouble at all. The rule of thumb I have used has been keep it simple, use html over css where possible for email, and test.

I did come across this: http://www.alistapart.com/articles/cssemail
Inspiring
January 21, 2009
Energon3 wrote:
> I'll Start. How about an extension that will take CSS styles (internal or
> external) and place them inline with the HTML code wherever said style(s) are
> being referenced. This would be enormously helpful for coding HTML emails.
>
> If this already exists somewhere, please let me know.

I've not seen such a beast. Have you tired creating the page with inline styles to begin with to avoid this issue? Or are you taking pre-made email templates and trying to make them work better?

I can imagine that something like this could be quite a difficult beast to manage given all the various permutations of selectors that could be applied to a page.

You may be able to run a set of find and replaces to make the changes you need such as:
tr.even{
background-color: #CCC;
}

You can do the following search:
Current Document
Search - Specific Tag: tr
With Attribute: class = even
Set attribute: style to: background-color: #CCC;

Of course I realize that it may take a while to repeat these steps for every selector you have defined in your CSS file(s) even if they happen to be as specific as my example, hence your question. Unfortunately, most folks are looking to go the other way from inline to linked.

FWIW: Google came up with the following page when I searched for "css convert linked to inline":
http://www.soldesignco.com/dev-csstoinline.php



--
Danilo Celic
| http://blog.extensioneering.com/
| WebAssist Extensioneer
| Adobe Community Expert