Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

css::style(3pm) [debian man page]

CSS::Style(3pm) 					User Contributed Perl Documentation					   CSS::Style(3pm)

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 perl v5.14.2 2008-04-23 CSS::Style(3pm)

Check Out this Related Man Page

CSS::DOM::Rule(3pm)					User Contributed Perl Documentation				       CSS::DOM::Rule(3pm)

NAME
CSS::DOM::Rule - CSS rule class for CSS::DOM VERSION
Version 0.14 SYNOPSIS
use CSS::DOM::Rule ':all'; # import constants use CSS::DOM; $sheet = new CSS::DOM; $sheet->insertRule('bla blah blah {}'); $rule = $sheet->cssRules->[0]; $rule->type; # STYLE_RULE $rule->cssText; # 'bla blah blah {}' or similar $rule->cssText('p { margin: 0 }'); # replace it $rule->parentStyleSheet; # $sheet DESCRIPTION
This module provides the CSS rule class for CSS::DOM. It implements the CSSRule and CSSUnknownRule DOM interfaces. METHODS
Constructor Only call the constructor on this class to create an 'unknown' rule. You have to call the constructor on a particular subclass to get another type. Normally you do not need to call this directly anyway. (See CSS::DOM's "parse" and "insertRule" methods.) But just in case you do want to call it, here it is: new CSS::DOM::Rule $parent; # unknown rule require CSS::DOM::Rule::Style new CSS::DOM::Rule::Style $parent; # etc. $parent is the parent rule, if the rule is nested, or the parent style sheet otherwise. Object Methods type Returns one of the constants below indicating the type of rule. cssText Returns this rule's CSS code. If you pass an argument, it will be parsed as the new CSS code for this rule (replacing the existing data), and the old value will be returned. This method will die if the replacement CSS code creates a different type of rule. parentStyleSheet This returns the style sheet to which the rule belongs. parentRule This returns the rule's parent rule, if there is one, or an empty list otherwise. There is only a parent rule if this one is nested, e.g., inside a media rule. EXPORTS
The following constants that indicate the type of rule will be exported on request (individually or with the ':all' tag): UNKNOWN_RULE STYLE_RULE CHARSET_RULE IMPORT_RULE MEDIA_RULE FONT_FACE_RULE PAGE_RULE SEE ALSO
CSS::DOM CSS::DOM::Rule::Style CSS::DOM::Rule::Media CSS::DOM::Rule::Page CSS::DOM::Rule::Import perl v5.10.1 2010-12-10 CSS::DOM::Rule(3pm)
Man Page