PHPackages                             goetas/xhtml-clsss-to-styl - 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. goetas/xhtml-clsss-to-styl

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

goetas/xhtml-clsss-to-styl
==========================

Convert CSS rules into local styles (HTML)

11.3k1PHP

Since Apr 1Pushed 5y ago2 watchersCompare

[ Source](https://github.com/goetas/xhtml-clsss-to-style)[ Packagist](https://packagist.org/packages/goetas/xhtml-clsss-to-styl)[ RSS](/packages/goetas-xhtml-clsss-to-styl/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

xhtml-clsss-to-style
====================

[](#xhtml-clsss-to-style)

Convert CSS rules into local styles (HTML)

Example
=======

[](#example)

```
use Goetas\XhtmlClassToStyle\XhtmlClassToStyle;

$dom = new \DOMDocument("1.0", "UTF-8");
$dom->loadXML("myhtml.html");

$api = new XhtmlClassToStyle();
$api->applyCss($dom, file_get_contents("style.css"));

echo $dom->saveXML(); // all classes of style.css will be transformed into local styles
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 Bus Factor1

Top contributor holds 72.7% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/776743?v=4)[Asmir Mustafic](/maintainers/goetas)[@goetas](https://github.com/goetas)

---

Top Contributors

[![goetas](https://avatars.githubusercontent.com/u/776743?v=4)](https://github.com/goetas "goetas (8 commits)")[![riccardonar](https://avatars.githubusercontent.com/u/5285820?v=4)](https://github.com/riccardonar "riccardonar (3 commits)")

### Embed Badge

![Health badge](/badges/goetas-xhtml-clsss-to-styl/health.svg)

```
[![Health](https://phpackages.com/badges/goetas-xhtml-clsss-to-styl/health.svg)](https://phpackages.com/packages/goetas-xhtml-clsss-to-styl)
```

###  Alternatives

[vimeo/ablincoln

PHP library for designing online experiments

153301.5k](/packages/vimeo-ablincoln)

PHPackages © 2026

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