CSS::Adaptor(3pm)

CSS::Adaptor3pm

Arbitrarily map css data for use in another context.

Usage

  use CSS;
  # create a CSS object with an adaptor
  my $css = new CSS({
       'adaptor' => 'CSS::Adaptor',
  });
  # load some CSS data
  $css->read_file( "my_file.css" );
  # change the adaptor
  $css->set_adaptor( "CSS::Adaptor::Pretty" );
  # output CSS object using the current adaptor
  print $css->output();

Overview

This class is used by CSS to translate a CSS object to a string. This allows CSS data to be easily mapped into other formats.

This documentation is for people who want to write their own CSS::Adaptor module. For usage information, see the documentation for CSS.

Methods

Constructor

new()

Called without options.

Functions

output_rule( $rule )

returns a string containing a formatted CSS::Style object, passed as an object ref

output_selectors( $selectors )

returns a string containing a formatted list of CSS::Selector objects, passed as an array ref

output_properties( $properties )

returns a string containing a formatted list of CSS::Property objects, passed as an array ref

output_values( $values )

returns a string containing a formatted list of CSS::Value objects, passed as an array ref

Releases

9 releases since Debian 5.0 (Lenny); the text changed 5 times.

  1. 5.0
  2. 6.0
  3. 7
  4. 8–10
  5. 11–12
  6. 13

Authors

Copyright (C) 2001-2002, Allen Day <[email protected]>

Copyright (C) 2003-2004, Cal Henderson <[email protected]>

From libcss-perl 1.09-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.