dev-master
9999999-dev https://github.com/goetas/xhtml-clsss-to-styleConvert CSS rules into local styles (HTML)
MIT
The Requires
- php >=5.3.2
- sabberworm/php-css-parser 5.0.*
by Asmir Mustafic
css style xml html xhtml
Wallogit.com
2017 © Pedro Peláez
Convert CSS rules into local styles (HTML)
Convert CSS rules into local styles (HTML), (*1)
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
Convert CSS rules into local styles (HTML)
MIT
css style xml html xhtml