# 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 style

## Methods

- `new`

    Returns a new My::Module object.

- `as_string`

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

# SOPYRIGHT AND LICENSE

This software is copyright (c) 2021 by Simone Cesano.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

# AUTHOR

Simone Cesano

# SEE ALSO

[perlpod](https://metacpan.org/pod/perlpod), [perlpodspec](https://metacpan.org/pod/perlpodspec)
