goetas / xhtml-clsss-to-styl
Convert CSS rules into local styles (HTML)
Installs: 1 031
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 1
Open Issues: 0
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-11-29 04:14:18 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