|
NAMECSS::DOM::Rule - CSS rule class for CSS::DOMVERSIONVersion 0.17SYNOPSISuse 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 DESCRIPTIONThis module provides the CSS rule class for CSS::DOM. It implements the CSSRule and CSSUnknownRule DOM interfaces.METHODSConstructorOnly 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
EXPORTSThe 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 ALSOCSS::DOMCSS::DOM::Rule::Style CSS::DOM::Rule::Media CSS::DOM::Rule::Page CSS::DOM::Rule::Import
Visit the GSP FreeBSD Man Page Interface. |