2006-08-12 20:22:09 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class HTMLPurifier_CSSDefinition
|
|
|
|
{
|
|
|
|
|
|
|
|
var $info = array();
|
|
|
|
|
|
|
|
function &instance($prototype = null) {
|
|
|
|
static $instance = null;
|
|
|
|
if ($prototype) {
|
|
|
|
$instance = $prototype;
|
|
|
|
} elseif (!$instance) {
|
|
|
|
$instance = new HTMLPurifier_CSSDefinition();
|
|
|
|
$instance->setup();
|
|
|
|
}
|
|
|
|
return $instance;
|
|
|
|
}
|
|
|
|
|
|
|
|
function HTMLPurifier_CSSDefinition() {}
|
|
|
|
|
|
|
|
function setup() {
|
|
|
|
|
|
|
|
$this->info['text-align'] = new HTMLPurifier_AttrDef_Enum(
|
|
|
|
array('left', 'right', 'center', 'justify'), false);
|
2006-08-13 16:52:31 +00:00
|
|
|
$this->info['border-style'] = new HTMLPurifier_AttrDef_Enum(
|
|
|
|
array('none', 'hidden', 'dotted', 'dashed', 'solid', 'double',
|
|
|
|
'groove', 'ridge', 'inset', 'outset'), false);
|
|
|
|
$this->info['clear'] = new HTMLPurifier_AttrDef_Enum(
|
|
|
|
array('none', 'left', 'right', 'both'), false);
|
|
|
|
$this->info['float'] = new HTMLPurifier_AttrDef_Enum(
|
|
|
|
array('none', 'left', 'right'), false);
|
|
|
|
$this->info['font-style'] = new HTMLPurifier_AttrDef_Enum(
|
|
|
|
array('normal', 'italic', 'oblique'), false);
|
|
|
|
$this->info['font-variant'] = new HTMLPurifier_AttrDef_Enum(
|
|
|
|
array('normal', 'small-caps'), false);
|
|
|
|
$this->info['list-style-position'] = new HTMLPurifier_AttrDef_Enum(
|
|
|
|
array('inside', 'outside'), false);
|
|
|
|
$this->info['list-style-type'] = new HTMLPurifier_AttrDef_Enum(
|
|
|
|
array('disc', 'circle', 'square', 'decimal', 'lower-roman',
|
|
|
|
'upper-roman', 'lower-alpha', 'upper-alpha'), false);
|
|
|
|
$this->info['text-transform'] = new HTMLPurifier_AttrDef_Enum(
|
|
|
|
array('capitalize', 'uppercase', 'lowercase', 'none'), false);
|
|
|
|
|
|
|
|
// this could use specialized code
|
|
|
|
$this->info['font-weight'] = new HTMLPurifier_AttrDef_Enum(
|
|
|
|
array('normal', 'bold', 'bolder', 'lighter', '100', '200', '300',
|
|
|
|
'400', '500', '600', '700', '800', '900'), false);
|
|
|
|
|
2006-08-12 20:22:09 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|