---
name: "CSS::Adaptor"
section: "3pm"
platform: "linux"
package: "libcss-perl"
version: "1.09-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/CSS::Adaptor"
---

# CSS::Adaptor(3pm)

Arbitrarily map CSS data for use in another context.

## NAME

CSS::Adaptor - Arbitrarily map CSS data for use in another context.

## SYNOPSIS

```
  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();
```

## DESCRIPTION

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

## AUTHORS

Copyright (C) 2001-2002, Allen Day \<allenday@ucla.edu\>

Copyright (C) 2003-2004, Cal Henderson \<cal@iamcal.com\>

## SEE ALSO

CSS
