PHP CSS Parser – PHP library for reading CSS

PHP CSS Parser is a PHP library for reading CSS and turning it into a structured document model that applications can inspect, modify, and render back to CSS.

It’s designed for developers who need programmatic access to stylesheets, whether for cleaning CSS, rewriting declarations, analysing rules, or generating optimized output from parsed CSS.

This is free and open source software.

Key Features

  • Parses CSS strings or files into a manipulable PHP object structure.
  • Allows rules, declarations, selectors, and values to be inspected and changed before output.
  • Renders parsed documents back to CSS, including optimized output formatting.
  • Installs via Composer using the sabberworm/php-css-parser package.
  • Supports modern CSS parsing improvements, including container queries and CSS Color Module Level 4 syntax.

Website: github.com/MyIntervals/PHP-CSS-Parser
Support:
Developer: MyIntervals
License: MIT License

PHP CSS Parser is written in PHP. Learn PHP with our recommended free books and free tutorials.


Related Software

CSS Parsers
PostCSSTransform styles with JavaScript plugins
Lightning CSSParser, transformer, bundler, and minifier
ReworkPlugin framework for CSS preprocessing
PHP CSS ParserPHP library for reading CSS
MenschNon-validating CSS parser
CSSTreeTool set for CSS
StylisLightweight CSS preprocessor
tinycss2CSS parser and generator
ParseGo library offering lexers, parsers, and parsing utilities
LibCSSCSS parser and selection engine
Ruby CSS ParserLoad, parse and cascade CSS rule sets
ParserLibCSS3 SAX-inspired parser
css-parserFork of the cssutils project
ph-cssParse, represent, modify, and write CSS stylesheets
StylecowModern CSS to all browsers
Gonzales PECSS parser which plays nicely with preprocessors
CSSOMCSS parser written in pure JavaScript

Read our verdict in the software roundup.


Best Free and Open Source Software LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.

We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more.

Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion.

Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted