# tijsverkoyen/CssToInlineStyles

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.

Repository: https://github.com/tijsverkoyen/CssToInlineStyles
Canonical: https://ross.abutalabs.com/products/csstoinlinestyles
Language: PHP
License: BSD-3-Clause
License Family: permissive
Last push: 2026-01-06T09:50:28+00:00

## Health v2 (maintenance only)
Score: 57/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 61, release rhythm 28, longevity 100
- inputs: {"age_days": 5791, "days_push": 239, "days_rel": 265, "gap_med": 355, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5826, forks 190 (observed 2026-08-28T04:09:30.135045+00:00)

## What it is
A PHP library that converts HTML pages or files by inlining their CSS styles directly into the HTML elements. This is primarily useful for sending HTML emails, where many clients don't support embedded stylesheets.

## Use cases
- inline css styles into html for email
- convert html with stylesheet to inline styles
- prepare html emails that render in outlook and gmail
- php library to inline css before sending email
- make html email templates email-client compatible

## When to choose
- you send HTML emails from a PHP application and need styles inlined
- you use Laravel or another framework needing CSS inlining for mail
- you want a small, well-established Composer package for this single task

## When to avoid
- you need support for CSS pseudo-selectors or css-escapes
- your project is not in PHP
- you need full CSS parsing beyond style inlining

## Facets
- artifact type: library
- maturity: stable
- function: templating, email, parser
- domain: web-development, email, frontend
- platform: php
- tags: css-inlining, html-email, composer

## Member repositories
- tijsverkoyen/CssToInlineStyles (main) score 57

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:30.135045+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:52:10.081261+00:00, confidence not recorded.
  - readme: https://github.com/tijsverkoyen/CssToInlineStyles (fetched 2026-08-28T04:09:30.135045+00:00, sha 9d8912486ba0)
- Data as of 2026-08-30T08:39:29.467469+00:00.
