Man pages sections > man3 > CSS::DOM::Rule::Style

CSS::DOM::Rule::Style - CSS style rule class for CSS::DOM

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

NAME

CSS::DOM::Rule::Style - CSS style rule class for CSS::DOM

VERSION

Version 0.16

SYNOPSIS

  use CSS::DOM;
  my $ruleset = CSS::DOM->parse(
      'p:firstline, h3 { font-weight: bold }'
  )->cssRules->[0];
  $ruleset->selectorText;      # 'p:firstline, h3'
  $ruleset->style;             # a CSS::DOM::Style object
  $ruleset->style->fontWeight; # 'bold'

DESCRIPTION

This module implements CSS style rules for CSS::DOM. It inherits from CSS::DOM::Rule and implements the CSSStyleRule DOM interface.

METHODS

selectorText
Returns a string representing the selector(s). Pass an argument to set it.
style
Returns the CSS::DOM::Style object representing the declaration block of this rule.

SEE ALSO

CSS::DOM
CSS::DOM::Style
CSS::DOM::Rule
2015-11-29 perl v5.20.2