PHPackages                             10usb/css-lib - 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. 10usb/css-lib

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

10usb/css-lib
=============

Library for reading / writing css

1.0.2(8y ago)1221PHPPHP &gt;=7.0

Since Jul 17Pushed 8y ago1 watchersCompare

[ Source](https://github.com/10usb/css-lib)[ Packagist](https://packagist.org/packages/10usb/css-lib)[ RSS](/packages/10usb-css-lib/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (3)DependenciesVersions (4)Used By (0)

This library allowes you parse a Cascading Style Sheets (CSS) document from which you can query property values given a path. The translation with of without inheritance of the values is up to you to decide. This gives you the freedom to create your own rules.

The path to construct is stack based, therefore it is easily implemented in recursive procedures. For example traversing a DOM structure.

As an extra this library supports is the ability to minify or reformat the contents by loading it and then respoduce with a new format.

Example
=======

[](#example)

```
$document = new Document();

$parser = new Parser($document->addSegment('style.css')); // could be any name
$parser->setSource(file_get_contents('style.css'));
$parser->parse();

$path = new Path($document, new ExampleTranslator());
$path->push()->setTagName('html');
$path->push()->setTagName('body');
$path->push()->setTagName('section')->addClass('slides');

// prints the height value the section slide would get
echo $path->getValue('height');
```

TODO's
======

[](#todos)

- Support for At-Rules
- Default example kit for a HTML inliner
- Make a HTMLify formatter set

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

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 ~14 days

Total

3

Last Release

3196d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/90ab04d4dc949aba8edf806dc8242eb5b3de5bbc85a5b40c84545ef423e0891c?d=identicon)[10usb](/maintainers/10usb)

---

Top Contributors

[![10usb](https://avatars.githubusercontent.com/u/4085551?v=4)](https://github.com/10usb "10usb (40 commits)")

### Embed Badge

![Health badge](/badges/10usb-css-lib/health.svg)

```
[![Health](https://phpackages.com/badges/10usb-css-lib/health.svg)](https://phpackages.com/packages/10usb-css-lib)
```

PHPackages © 2026

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