ptachoire / cssembed
Css url embed library.
Installs: 1 414 408
Dependents: 41
Suggesters: 27
Security: 0
Stars: 20
Watchers: 3
Forks: 6
Open Issues: 3
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2024-12-21 14:17:20 UTC
README
PhpCssEmbed embed data uri in css part
Usage
Use embed css with a file
<?php
$pce = new \CssEmbed\CssEmbed();
echo $pce->embedCss( $css_file );
Or directly with css content
<?php
$pce = new \CssEmbed\CssEmbed();
$pce->setRootDir( '/path/to/files' );
echo $pce->embedString( $css_content );
Unit Tests
phpunit
Thanks
Files structure inspired by Geocoder from William Durand