CSS One, unify your your style sheet and it's images into one file
June 27, 2012
CSS One will do
- print minifyed CSS
- embed images into the document output
- print HTML5 or xHTML output
- add custom feeds
- load custom HTML widget markup.
CSS output example
for the best performance, please keep your styles organized in different folders with their images. view the jQuery UI css folder (found in the unzipped release folder) for the best example to get the best results.
$css=new css_one(); $css->add_style('./book/style1.css'); $css->add_style('./css/style2.css'); $css->printCSS(); exit();
HTML5 / xHTML output example
$css=new css_one(); $css->title="CSS One "; $css->description="This is a jQuery UI CSS theme testing tool"; $css->keywords="HTML5, css, base64 images, phpclasses"; $css->add_atom('Test jQuery UI',$_SERVER['SCRIPT_NAME'].'/feed.atom'); $css->set_jquery('/js/jquery-1.7.2.min.js'); $css->set_jquery_ui('/js/jquery-ui-1.8.21.custom.min.js'); $css->add_js('/js/ui-demo.js'); $css->add_style('style.php'); $css->load_body(dirname(__FILE__).'/jquery-ui/demo.html'); echo $css;
CSS files often define styles that reference images and other resources that are available in separate locations.
This class can process one or more CSS style sheets in such way that it retrieves the information of images and embed them in the processed CSS output, so all CSS and image data is included in a single style sheet.