dev-master
9999999-dev http://github.com/romanmatyus/MiniSpriteMiniSprite CSS sprites generator
MIT
The Requires
- php >=5.3
The Development Requires
by Roman Mátyus
MiniSprite CSS sprites generator
MiniSprite is library for automatized generating CSS Sprites from CSS definitions., (*2)
MiniSprite requires PHP 5.3.3 or later., (*3)
The best way to install MiniSprite is use Composer package rm/minisprite
or manual download the latest ZIP package from GitHub., (*4)
The downloaded package includes the following directories:, (*5)
src
: this directory contains the source code of MiniSprite. This is
the only directory that you will need in order to deploy your application., (*6)
tests
: contains MiniSprite unit tests. Tests is too usable as examples od use case., (*7)
namespace MiniSprite; require __DIR__ . '/MiniSprite/vendor/autoload.php'; $miniSprite = new MiniSprite; // Configuration of Minisprite. $miniSprite->setImageDirSource("http://www.umb.sk"); // Base path for searching images in CSS content. $miniSprite->setImageDirOutput("./"); // Directory for saving sprite images. $miniSprite->setImageDirOutputCss("./"); // Relative path for link of sprite images in regenerated CSS content. // Registration of folding algorithms. $miniSprite->addFolder(new HorizontalFolder); $miniSprite->addFolder(new VerticalFolder); // Registration of analyzer for winner selection. $miniSprite->setAnalyzer(new MinimalAreaAnalyzer); // Call compilation. // In the variable $newCSS is content of regenerated CSS input. $newCss = $miniSprite->compile(file_get_contents("http://www.umb.sk/umb/umbbb.nsf/styl.css"));
Roman Mátyus romanmatyus@romiix.org, (*8)
MiniSprite CSS sprites generator
MIT