goetas / xhtml-clsss-to-styl
Convert CSS rules into local styles (HTML)
dev-master / 1.0.x-dev
2021-04-01 06:57 UTC
Requires
- php: >=5.3.2
- sabberworm/php-css-parser: ^5.0|^6.0|^7.0
- symfony/css-selector: ^2.8|^3.0|^4.0|^5.0
This package is auto-updated.
Last update: 2024-10-29 04:03:56 UTC
README
Convert CSS rules into local styles (HTML)
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