<?php
/**
* @package CssDispatch
*/
/** Includes the library classes */
include 'class.Css.php';
include 'class.CssDispatcher.php';
$estilos = new CssDispatcher;
//Creates a new template
$general = new Css('example.css.php');
//Assigns some variables
$general->background = '#eee';
$general->border_color = 'red';
$general->header_size = 2.1;
//Creates another template for WebKit-based browsers
$another = new Css('example2.css.php', Css::UA_WEBKIT);
$another->bold = 'font-weight: bold';
//Adds the templates to the dispatcher
$estilos->add($general);
$estilos->add($another);
$estilos->render();
?>
|