NAME

Mojo::DOM::Role::Style - A Mojo::DOM role for managing inline CSS styles

SYNOPSIS

use My::Module;
my $object = My::Module->new();
print $object->as_string;

use Mojo::DOM;
use Mojo::File qw/path/;

$\ = "\n"; $, = "\t";

my $svg = Mojo::DOM->new->with_roles('+Style', '+File')->parse(path($ARGV[0])->slurp);

print $svg->at('#rect10')->style('stroke', 'black');

print $svg->at('#rect10')->style('stroke', 'black')->attr('x');

print $svg->at('#rect10')->style('stroke', 'black')->{stroke};

print $svg->at('#rect10')->style('stroke', 'black')->{fill};

DESCRIPTION

This module adds a convenience method for getting and setting a Mojo::DOM element's inline styl

Methods

-

new

Returns a new My::Module object.

-

as_string

Returns a stringified representation of the object. This is mainly for debugging purposes.

LICENSE

This is released under the Artistic License. See perlartistic.

AUTHOR

Juerd - http://juerd.nl/

SEE ALSO

perlpod, perlpodspec