NAME

CSS::DOM::Value::Primitive - CSSPrimitiveValue class for CSS::DOM

VERSION

Version 0.07

SYNOPSIS

# ...

DESCRIPTION

This module implements objects that represent CSS primitive property values (as opposed to lists). It implements the DOM CSSPrimitiveValue interface and inherits from CSS::DOM::Value.

METHODS

Constructor

You probably don't need to call this, but here it is anyway:

$val = new CSS::DOM::Value::Primitive TYPE, @args;
$val = new CSS::DOM::Value::Primitive TYPE, %args;

where TYPE is one of the constants listed below. There are two ways of specifying arguments.

Array-style arguments (@args) are interpreted differently depending on the TYPE:

$class = "CSS::DOM::Value::Primitive";
$val = new $class  CSS_DIMENSION, $value, $unit_text
$val = new $class  CSS_COUNTER,   $counter_name, $separator, $style
$val = new $class  CSS_RECT,      $top, $right, $bottom, $left
                                     # these four are CSSValue objects

All other types just use the first of the @args, treating it as the value.

With hash-style arguments, you can specify either:

$class = "CSS::DOM::Value::Primitive";
$val = new $class  CSS_STRING, value => 'foo';
$val = new $class  CSS_STRING, css => '"\66oo"';

Object Methods

cssText

Returns a string representation of the attribute. Pass an argument to set it (not yet supported).

The rest have still to be implemented.

cssValueType

Returns CSS::DOM::Value::CSS_PRIMITIVE_VALUE.

CONSTANTS

The following constants can be imported with use CSS::DOM::Value::Primitive ':all'. They represent the type of primitive value.

CSS_UNKNOWN
CSS_NUMBER
CSS_PERCENTAGE
CSS_EMS
CSS_EXS
CSS_PX
CSS_CM
CSS_MM
CSS_IN
CSS_PT
CSS_PC
CSS_DEG
CSS_RAD
CSS_GRAD
CSS_MS
CSS_S
CSS_HZ
CSS_KHZ
CSS_DIMENSION
CSS_STRING
CSS_URI
CSS_IDENT
CSS_ATTR
CSS_COUNTER
CSS_RECT
CSS_RGBCOLOR

SEE ALSO

CSS::DOM

CSS::DOM::Value

CSS::DOM::Value::List (doesn't exist yet)

CSS::DOM::Style

4 POD Errors

The following errors were encountered while parsing the POD:

Around line 281:

'=item' outside of any '=over'

Around line 287:

=end comment without matching =begin. (Stack: [empty])

Around line 295:

'=item' outside of any '=over'

Around line 347:

You forgot a '=back' before '=head1'