Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions lib/CSS/Inliner.pm
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ CSS::Inliner - Library for converting CSS <style> blocks to inline styles.

=head1 SYNOPSIS

use CSS::Inliner;
use CSS::Inliner;

my $inliner = new CSS::Inliner();
my $inliner = CSS::Inliner->new;

$inliner->read_file({ filename => 'myfile.html' });
$inliner->read_file({ filename => 'myfile.html' });

print $inliner->inlinify();
print $inliner->inlinify();

=head1 DESCRIPTION

Expand Down Expand Up @@ -135,7 +135,7 @@ stylesheet reference within the document.
This method requires you to pass in a params hash that contains a
url argument for the requested document. For example:

$self->fetch_file({ url => 'http://www.example.com' });
$self->fetch_file({ url => 'http://www.example.com' });

Note that you can specify a user-agent to override the default user-agent
of 'Mozilla/4.0' within the constructor. Doing so may avoid certain issues
Expand Down Expand Up @@ -193,12 +193,12 @@ if specified. It subsequently calls the read() method automatically.
This method requires you to pass in a params hash that contains a
filename argument. For example:

$self->read_file({ filename => 'myfile.html' });
$self->read_file({ filename => 'myfile.html' });

Additionally you can specify the character encoding within the file, for
example:

$self->read_file({ filename => 'myfile.html', charset => 'utf8' });
$self->read_file({ filename => 'myfile.html', charset => 'utf8' });

Input Parameters:
filename - name of local file presumably containing both html and css
Expand Down Expand Up @@ -252,7 +252,7 @@ separately. Class/ID/Names used in the markup are left alone.
This method requires you to pass in a params hash that contains scalar
html data. For example:

$self->read({ html => $html });
$self->read({ html => $html });

NOTE: You are required to pass a properly encoded perl reference to the
html data. This method does *not* do the dirty work of encoding the html
Expand Down
12 changes: 7 additions & 5 deletions lib/CSS/Inliner/Parser.pm
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ necessary for later manipulation.
This method requires you to pass in a params hash that contains a
filename argument. For example:

$self->read_file({ filename => 'myfile.css' });
$self->read_file({ filename => 'myfile.css' });

=cut

Expand Down Expand Up @@ -151,7 +151,7 @@ rules themselves should apply as expected.
This method requires you to pass in a params hash that contains scalar
css data. For example:

$self->read({ css => $css });
$self->read({ css => $css });

=cut

Expand Down Expand Up @@ -267,7 +267,7 @@ Write the parsed and manipulated CSS out to a file parameter
This method requires you to pass in a params hash that contains a
filename argument. For example:

$self->write_file({ filename => 'myfile.css' });
$self->write_file({ filename => 'myfile.css' });

=cut

Expand Down Expand Up @@ -408,7 +408,8 @@ relevant when handling earlier versions of the standard. These rules have a prel
with a data block consisting of various rule declarations.

Adding a qualified rule is trivial, for example:
$self->add_qualified_rule({ selector => 'p > a', block => 'color: blue;' });

$self->add_qualified_rule({ selector => 'p > a', block => 'color: blue;' });

=cut

Expand Down Expand Up @@ -441,7 +442,8 @@ containing a rule type, prelude and associated data block. The standard is evolv
examples, but these rules always start with @.

At rules are a little more complex, an example:
$self->add_at_rule({ type => '@media', prelude => 'print', block => 'body { font-size: 10pt; }' });

$self->add_at_rule({ type => '@media', prelude => 'print', block => 'body { font-size: 10pt; }' });

=cut

Expand Down