Registry / utility / tijsverkoyen-css-to-inline-styles

tijsverkoyen-css-to-inline-styles

JSON →
library2.4.0phppackagistunverified

Converts HTML pages/files into HTML with inline styles, useful for sending emails.

composer require tijsverkoyen/css-to-inline-styles
INSTALL
IMPORT
SIG · TIJSVERKOYEN-CSS-T
T
tijsverkoyen-css-to-inline-styles
utilityphpv2.4.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CssToInlineStyles
use TijsVerkoyen\CssToInlineStyles\CssToInlineStyles;

Convert HTML with external CSS to inline styles.

use TijsVerkoyen\CssToInlineStyles\CssToInlineStyles; $cssToInlineStyles = new CssToInlineStyles(); $html = '<html><head><style>body { color: red; }</style></head><body><p>Hello</p></body></html>'; $inlined = $cssToInlineStyles->convert($html); echo $inlined;
Debug
Known issues

No known issues recorded.

Upgrade
Version history
2.4.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
tijsverkoyen-css-to-inline-styles — pip install tijsverkoyen-css-to-inline-styles · libregistry