PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of khjk   CSS Dispatcher   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example of CssDispatcher
Class: CSS Dispatcher
Compose CSS style sheets from multiple templates
Author: By
Last change:
Date: 14 years ago
Size: 642 bytes


Class file image Download

 * @package CssDispatch

/** Includes the library classes */
include 'class.Css.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