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

# CSS::Style(3pm)

A ruleset in a CSS object tree

## NAME

CSS::Style - A ruleset in a CSS object tree

## SYNOPSIS

```
  use CSS;
```

## DESCRIPTION

This module represents a ruleset in a CSS object tree. Read the CSS.pm pod for information about the CSS object tree.

## METHODS

### CONSTRUCTORS

- new() or "new( { ..options.. } )"

  This constructor returns a new `"CSS::Style"` object, with an optional hash of options.

  ```
    adaptor       adaptor to use for serialization
  ```

### ACCESSORS

- add\_selector( $selector )

  This method adds a selector to the selector list for the object. `$selector` is a reference to a CSS::Selector object.

- add\_property( $property )

  This method adds a selector to the property list for the object. `$property` is a reference to a CSS::Property object.

- set\_adaptor( 'CSS::Adaptor::Foo' )

  This method sets the current adaptor for the object.

- selectors()

  This method is used to serialize the ruleset's selectors, using the current adaptor. It returns a string which come from the adaptor's `output_selectors()` method.

- properties()

  This method is used to serialize the ruleset's properties, using the current adaptor. It returns a string which come from the adaptor's `output_properties()` method.

- to\_string()

  This method is used to serialize the ruleset, using the current adaptor. It returns  a string which comes from the adaptor's **output\_rules()** method.

- get\_property\_by\_name( 'property\_name' )

  Returns the first CSS::Property object with the specified name. Returns zero on failure.

## AUTHOR

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

## SEE ALSO

CSS, http://www.w3.org/TR/REC-CSS1
