CSS-Tiny
view release on metacpan or search on metacpan
needing to upgraded when not needed.
1.10 Thu May 26 2005
- Added the ->clone method
1.09 Thu Mar 24 2005
- Lars Thegler noted that 3-argument open is not supported by 5.005.
Added a small fix to change it to 2-argument open.
1.08 Fri Feb 18 2005
- Adding XHTML support with the ->xhtml method
- Cleaning up the POD a little
1.07 Tue Feb 15 2005
- Removing braindead Build.PL
1.06 Sun Jan 16 2005
- Added ->html to generate CSS to dump on a HTML page
- Modernised the test suite and makefile
1.05 Wed Jul 14 2004
lib/CSS/Tiny.pm view on Meta::CPAN
The C<write $filename> generates the stylesheet for the properties, and
writes it to disk. Returns true on success. Returns C<undef> on error.
=head2 html
The C<html> method generates the CSS, but wrapped in a C<style> HTML tag,
so that it can be dropped directly onto a HTML page.
=head2 xhtml
The C<html> method generates the CSS, but wrapped in a C<style> XHTML tag,
so that it can be dropped directly onto an XHTML page.
=head2 errstr
When an error occurs, you can retrieve the error message either from the
C<$CSS::Tiny::errstr> variable, or using the C<errstr> method.
=head1 CAVEATS
=head2 CSS Rule Order
t/02_main.t view on Meta::CPAN
}
-->
</style>
END_HTML
#####################################################################
# Check the XHTML generation
my $xhtml = CSS::Tiny->new;
isa_ok( $xhtml, 'CSS::Tiny' );
is( $xhtml->xhtml, '', '->xhtml returns empty string for empty stylesheet' );
$xhtml->{'.foo'}->{bar} = 1;
is( $html->xhtml . "\n", <<'END_XHTML', '->xhtml returns correct looking HTML' );
<style type="text/css">
/* <![CDATA[ */
.foo {
( run in 0.588 second using v1.01-cache-2.11-cpan-49f99fa48dc )