tijsverkoyen/css-to-inline-styles

CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.

Installs: 564 325

Dependents: 36

Stars: 463

Watchers: 32

Forks: 76

Open Issues: 12

Language: PHP

1.5.4 2015-04-01 14:40 UTC

README

Build Status

CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very usefull when you're sending emails.

About

PHP CssToInlineStyles is a class to convert HTML into HTML with inline styles.

Installation

The recommended installation way is through Composer.

$ composer require tijsverkoyen/css-to-inline-styles

Documentation

The class is well documented inline. If you use a decent IDE you'll see that each method is documented with PHPDoc.

Known issues

  • no support for pseudo selectors
  • UTF-8 charset is not always detected correctly. Make sure you set the charset to UTF-8 using the following meta-tag in the head: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />. (Note: using <meta charset="UTF-8"> does NOT work!)

Sites using this class