CSS-DOM

 view release on metacpan or  search on metacpan

t/property-parser.t  view on Meta::CPAN

use tests 3; # speak
for(qw( normal none spell-out )) {
 $s->speak($_);
 is $s->speak, $_, "speak value: \L$_"
}

use tests 8; # speech-rate
for(qw( 3 x-slow slow medium fast x-fast faster slower )) {
 $s->speechRate($_);
 is $s->speechRate, $_, "speech-rate value: \L$_"
}

use tests 1; # stress
$s->stress(5);
is $s->stress, 5, "stress";

use tests 2; # table-layout
for(qw( auto fixed )) {
 $s->tableLayout($_);
 is $s->tableLayout, $_, "table-layout value: \L$_"
}

use tests 5; # text-align
for(qw( left right center justify auto )) {
 $s->textAlign($_);
 is $s->textAlign, $_, "text-align value: \L$_"
}

use tests 7; # text-decoration
for(
 "none",
 "underline",
 'overline',
 'line-through',
 'blink',
 'underline overline line-through blink',
 'overline blink underline line-through',
){
  $s->textDecoration($_);
  is $s->textDecoration, $_, "setting text-decoration to $_";
}

use tests 2; # text-indent
for(qw/5em 5%/){
  $s->textIndent($_);
  is $s->textIndent, $_, "setting text-indent to $_";
}

use tests 4; # text-transform
for(qw( capitalize uppercase lowercase none )) {
 $s->textTransform($_);
 is $s->textTransform, $_, "text-transform value: \L$_"
}

use tests 3; # top
for(qw/5em 5% auto/){
  $s->top($_);
  is $s->top, $_, "setting top to $_";
}

use tests 3; # unicode-bidi
for(qw/normal embed bidi-override/){
  $s->unicodeBidi($_);
  is $s->unicodeBidi, $_, "setting unicode-bidi to $_";
}

use tests 10; # vertical-align
for(qw/ baseline sub super top text-top middle bottom text-bottom 5% 5em/){
  $s->verticalAlign($_);
  is $s->verticalAlign, $_, "setting vertical-align to $_";
}

use tests 3; # visibility
for(qw/ visible hidden collapse /){
  $s->visibility($_);
  is $s->visibility, $_, "setting visibility to $_";
}

use tests 8; # voice-family
for(qw/ male female child "Times" Times /,
    'Lucida Grande',
    'male, female, Lucida Grande',
    'Lucida Grande, Times, child',
) {
 $s->voiceFamily($_);
 is $s->voiceFamily, $_, "voice-family value: \L$_"
}

use tests 10; # volume
for(qw/ soft medium 5% 5 silent x-soft soft medium loud x-loud /){
  $s->volume($_);
  is $s->volume, $_, "setting volume to $_";
}

use tests 1; # widows
$s->widows(5);
is $s->widows, 5, "widows";

use tests 3; # width
for(qw/5em 5% auto/){
  $s->width($_);
  is $s->width, $_, "setting width to $_";
}

use tests 2; # word-spacing
for(qw/ normal 51em /){
  $s->wordSpacing($_);
  is $s->wordSpacing, $_, "setting word-spacing to $_";
}

use tests 2; # z-index
for(qw/ auto 5 /){
  $s->zIndex($_);
  is $s->zIndex, $_, "setting z-index to $_";
}

# ------------- CSS::DOM’s part of the interface ---------- #

require CSS::DOM;

use tests 3;

my $sheet = CSS::DOM::parse(
 '* {azimuth: 0; azimuth: blue}', property_parser => $css21



( run in 0.953 second using v1.01-cache-2.11-cpan-e93a5daba3e )