jandc/inline-css-provider
Composer 安装命令:
composer require jandc/inline-css-provider
包简介
Silex provider which wraps the features of CssToInlineStyles
README 文档
README
Note: due to the (personal) need to be bolt.cm compliant; silex2 is not supported!!!
InlineCssProvider is a silex compliant serviceprovider of the CssToInlineStyles class by Tijs Verkoyen (https://github.com/tijsverkoyen/CssToInlineStyles).
Additional feature(s) are:
- Direct rendering from twig.
Usage
- Base service: 'inlinecss.inlinecss'
- Render service: 'inlinecss.render'
The base service is a simple wrapper, the renderservice resolves a twig template first (optional)
sample
$app->register(new InlineCssProvider(__DIR__.'/Resources/views/mails/css/main.css'));
$email = new \Swift_Message(
"Import failed on when processing the importfile",
$app['inlinecss.render]->renderAndInlineTemplate('mails/failed_import.twig')
, 'text/html');
统计信息
- 总下载量: 1.07k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: ISC
- 更新时间: 2016-10-03