PHPackages                             drmonkeyninja/cakephp-inline-css - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. drmonkeyninja/cakephp-inline-css

ActiveCakephp-plugin[Utility &amp; Helpers](/categories/utility)

drmonkeyninja/cakephp-inline-css
================================

CakePHP inline CSS plugin

3.0.0(9y ago)8130.0k↓50%2MITPHP

Since Jan 4Pushed 5y ago1 watchersCompare

[ Source](https://github.com/drmonkeyninja/cakephp-inline-css)[ Packagist](https://packagist.org/packages/drmonkeyninja/cakephp-inline-css)[ Docs](https://github.com/drmonkeyninja/cakephp-inline-css)[ RSS](/packages/drmonkeyninja-cakephp-inline-css/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (7)Used By (0)

CakePHP Inline CSS
==================

[](#cakephp-inline-css)

[![License](https://camo.githubusercontent.com/b6d681a87319d9a4b2fea6eb21fa51af5ed46f6dc52af8b6b41e99dbd2a1ce52/68747470733a2f2f706f7365722e707567782e6f72672f64726d6f6e6b65796e696e6a612f63616b657068702d696e6c696e652d6373732f6c6963656e73652e737667)](https://packagist.org/packages/drmonkeyninja/cakephp-inline-css) [![Build Status](https://camo.githubusercontent.com/12067443c4743e35002982d38da9cabcc160b01c8edcb46a1af99f272e514630/68747470733a2f2f7472617669732d63692e6f72672f64726d6f6e6b65796e696e6a612f63616b657068702d696e6c696e652d6373732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/drmonkeyninja/cakephp-inline-css)

This plugin provides a CakePHP helper that uses [CssToInlineStyles](https://github.com/tijsverkoyen/CssToInlineStyles) to convert HTML style blocks to inline CSS on a View template. Its intended use is with generating email templates where many email clients often require styles applied directly to the elements.

Requirements
------------

[](#requirements)

- CakePHP 3.x

Installation
------------

[](#installation)

This plugin should be installed using Composer:-

```
composer require drmonkeyninja/cakephp-inline-css:3.0.*

```

Then add the following line to your bootstrap.php to load the plugin.

```
Plugin::load('InlineCss');
```

Usage
-----

[](#usage)

To use this plugin you want to load the `InlineCss` helper to use with your email's HTML template:-

```
$email = new Email();
$email->template('welcome', 'fancy')
    ->emailFormat('html')
    ->helpers(['InlineCss.InlineCss'])
    ->to('bob@example.com')
    ->from('app@domain.com')
    ->send();
```

When rendering your email template the plugin will then convert any CSS defined in an inline `` block in your template to inline CSS. So, if your email view template looks like this:-

```

	.link {color: red;}

Link
```

It will be rendered as:-

```
Link
```

This makes generating HTML emails a lot simpler as you can write your CSS in a more DRY approach.

I recommend you look consider deferring the sending of emails using something like the excellent [Queue plugin](https://github.com/dereuromark/cakephp-queue) to improve your app's response time for users when using this plugin.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~83 days

Total

5

Last Release

3456d ago

Major Versions

2.0.2 → 3.x-dev2016-11-30

### Community

Maintainers

![](https://www.gravatar.com/avatar/2f481390bacd8d21d0caec9b0516971dad97f9f50fa8c8010460860ff76f6e8d?d=identicon)[drmonkeyninja](/maintainers/drmonkeyninja)

---

Top Contributors

[![drmonkeyninja](https://avatars.githubusercontent.com/u/357623?v=4)](https://github.com/drmonkeyninja "drmonkeyninja (44 commits)")

---

Tags

cakephpcakephp-inline-csscakephp-plugincakephp2cakephp3helpercsscakephp

### Embed Badge

![Health badge](/badges/drmonkeyninja-cakephp-inline-css/health.svg)

```
[![Health](https://phpackages.com/badges/drmonkeyninja-cakephp-inline-css/health.svg)](https://phpackages.com/packages/drmonkeyninja-cakephp-inline-css)
```

###  Alternatives

[dereuromark/cakephp-tools

A CakePHP plugin containing lots of useful and reusable tools

338920.1k32](/packages/dereuromark-cakephp-tools)[drmonkeyninja/cakephp-social-share

CakePHP helper for creating social share/bookmark links

34103.3k](/packages/drmonkeyninja-cakephp-social-share)[dereuromark/cakephp-calendar

A CakePHP plugin to easily create calendars.

1646.8k1](/packages/dereuromark-cakephp-calendar)[dereuromark/cakephp-dto

A CakePHP plugin for generating immutable Data Transfer Objects with full type safety

2988.9k3](/packages/dereuromark-cakephp-dto)[dereuromark/cakephp-url-cache

CakePHP plugin to speed up URL reverse lookup

24117.2k](/packages/dereuromark-cakephp-url-cache)[trentrichardson/cakephp-shrink

Compiles, combines, and minifies javascript, coffee, less, scss, and css

1619.3k](/packages/trentrichardson-cakephp-shrink)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
