CssToInlineStyles
CssToInlineStyles copied to clipboard
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.
Is there a way to add support for `@import` to include other CSS files?
Phpunit tests all succeeded as before. Fixes #233
This line has been deprecated in PHP 8.2: `$document->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'));` (`/src/CssToInlineStyles.php` on line 116) Symfony fixed it like this, but YMMV: `mb_encode_numericentity($html, [0x80, 0xFFFF, 0, 0xFFFF], 'UTF-8');` I'll try...
Hi, i have a problem with this package on shared-hosting while i haven't this problem on localhost **gives me the error:** { "message": "Undefined property: DOMDocument::$documentElement", "exception": "ErrorException", "file": "/home/h189025/public_html/system/vendor/tijsverkoyen/css-to-inline-styles/src/CssToInlineStyles.php",...
I'm trying to use a certain CSS on my HTML markup with **dl** and **dt** tags, and I want to convert it in to inline styles for showing the dl-list...
Hi! I'm working on a problem with certain versions of Outlook email client, and came to a solution where I need to apply styles to every email client, except Microsoft...
I've done a port of Bootstrap-Email (https://github.com/bootstrap-email/bootstrap-email) to PHP. There's some different behavior between this package and the ruby inlining package. If I have lets say: ` .btn { border:...
Parsing the `}\c{` css results in a error: Code: ```php $cssToInlineStyles = new CssToInlineStyles(); echo $cssToInlineStyles->convert('', '}\c{'); ``` Result: `DOMXPath::query(): Unfinished literal` Info: ``` [message] => DOMXPath::query(): Unfinished literal [file]...
Hi! It'd be nice if we can override existing styles in some cases. For example, double processing the same HTML but with different CSS produce undesired styles state for some...
With version 2.2.0, void elements are no longer closed when using `xhtml` doctype. The following document ``` Title Message ``` Will be converted into this: ``` Title Message ``` Notice...