CSS-DOM
view release on metacpan or search on metacpan
lib/CSS/DOM/Interface.pm view on Meta::CPAN
captionSide => STR,
clear => STR,
clip => STR,
color => STR,
content => STR,
counterIncrement => STR,
counterReset => STR,
cue => STR,
cueAfter => STR,
cueBefore => STR,
cursor => STR,
direction => STR,
display => STR,
elevation => STR,
emptyCells => STR,
cssFloat => STR,
font => STR,
fontFamily => STR,
fontSize => STR,
fontSizeAdjust => STR,
fontStretch => STR,
lib/CSS/DOM/PropertyParser.pm view on Meta::CPAN
'cue-after' => [2,1],
},
serialise => sub {
my $p = shift;
my @vals = @$p{"cue-before", "cue-after"};
$vals[1] eq $vals[0] and pop @vals;
return join " ", map length $_ ? $_ : 'none', @vals;
},
},
cursor => {
format => '[(<url>) ,]*
(auto|crosshair|default|pointer|move|e-resize|
ne-resize|nw-resize|n-resize|se-resize|sw-resize|
s-resize|w-resize|text|wait|help|progress)',
default => 'auto',
inherit => 1,
list => 1,
},
direction => {
t/CSS2Properties.t view on Meta::CPAN
use strict; use warnings;
our $tests;
BEGIN { ++$INC{'tests.pm'} }
sub tests'VERSION { $tests += pop };
sub tests'import { $tests += pop if @_ > 1 };
use Test::More;
plan tests => $tests;
BEGIN {
our @props = qw /azimuth background background-attachment background-color background-image background-position background-repeat border border-bottom border-bottom-color border-bottom-style border-bottom-width border-collapse border-color border-lef...
}
require CSS::DOM::Style;
my $decl = CSS::DOM::Style::parse
( join('', map"$_: 65;", our @props) );
use tests +4 * our @props; # normal CSS property methods
for (@props) {
(my $meth = $_) =~ s/-(.)/\u$1/g;
is $decl->$meth, '65', "get $meth";
t/CSSValue.t view on Meta::CPAN
$$_[3], &CSS_PRIMITIVE_VALUE, $$_[4]
}
use tests 20;
test_value $s,"counter-increment","::List", [
separator => ' ', values => [
[type => &CSS::DOM::Value::Primitive::CSS_IDENT, value => 'open-quote'],
[type => &CSS::DOM::Value::Primitive::CSS_NUMBER, value => '8'],
]
], "open-quote 8", &CSS_VALUE_LIST, 'space-separated list';
test_value $s,"cursor","::List", [
separator => ', ', values => [
[type => &CSS::DOM::Value::Primitive::CSS_URI, value => 'frew'],
[type => &CSS::DOM::Value::Primitive::CSS_IDENT, value => 'crosshair'],
]
], "url(frew), crosshair", &CSS_VALUE_LIST, 'comma-separated list';
test_value $s,"content","::List", [
separator => ', ', values => [
[type => &CSS::DOM::Value::Primitive::CSS_URI, value => 'cror'],
]
], "url(cror)", &CSS_VALUE_LIST, 'single-valued list';
t/property-parser.t view on Meta::CPAN
$s->cue('');
is $s->cue, '', 'setting cue to nothing ...';
is &$props, ',', ' ... resets all its sub-properties';
$s->cue('none');
$s->cueAfter("");
is $s->cue, '',
'cue is blank if not all sub-properties are specified';
}
use tests 17; # cursor
for('url(lous), auto',
'url(os), crosshair',
'url(exe), default',
'url(eelthe), pointer',
'url(oit), move',
'url(ou), e-resize',
'url(ampe), ne-resize',
'url(lon), nw-resize',
'url(ose), n-resize',
'url(rgat), se-resize',
'url(aike), sw-resize',
'url(ryx), s-resize',
'url(ate), w-resize',
'url(tonte), text',
'url(san), wait',
'url(ast), help',
'url(264), url(ech), progress',
) {
$s->cursor($_);
is $s->cursor, $_, "cursor value: \L$_"
}
use tests 2; # direction
for(qw/ ltr rtl /) {
$s->direction($_);
is $s->direction, $_, "direction value: \L$_"
}
use tests 16; # display
for(qw/ inline block list-item run-in inline-block table inline-table
( run in 0.264 second using v1.01-cache-2.11-cpan-4d50c553e7e )