Adding data via a role

package HasCSS;
use Moose::Role;
use MooseX::AttributeHelpers;

has 'css' => (
    metaclass => 'Collection::Hash',
    is        => 'ro',
    isa       => 'HashRef[Str]',
    ...
);

package HTML::Form::Input;
use Moose;
with 'HasCSS';
...
sub convert_to_html {
    my $foo = shift;
    if($foo->does('HasCSS')){
        # handle the CSS
    }
    # handle the HTML
}