The manakai project

Web::DOM::CSSStyleSheet

The DOM CSSStyleSheet object

DESCRIPTION

The Web::DOM::CSSStyleSheet class implements the DOM CSSStyleSheet interface. It represents a CSS style sheet.

METHODS

Following methods are available:

$list = $ss->css_rules

Return the Web::DOM::CSSRuleList object containing the CSS rules in the style sheet. [CSSOM]

$string = $ss->css_text

Return the serialized style sheet. [MANAKAI]

$ss->delete_rule ($index)

Return a rule from the list of rules contained by the style sheet. [CSSOM]

$boolean = $ss->disabled
$ss->disabled ($boolean)

Return or set the disable flag of the style sheet. [CSSOM]

$string = $ss->href

Return the URL of the style sheet. If the style sheet is embedded in other document, return undef. [CSSOM] [HTML]

$index = $ss->insert_rule ($string, $index)

Parse the string as a CSS rule and insert into the specified index of the list of rules contained by the style sheet. [CSSOM]

$url = $ss->manakai_base_url

Return the base URL of the style sheet. [MANAKAI]

$charset = $ss->manakai_input_encoding

Return the encoding name used to parse the style sheet. If the style sheet is embedded in other document, return utf-8. [MANAKAI]

$boolean = $ss->manakai_is_default_namespace ($url)

Return whether the specified namespace URL is the default namespace or not. If the namespace URL is undef or the empty string, it represents the null namespace. [MANAKAI]

$prefix = $ss->manakai_lookup_namespace_prefix ($url)

Return the namespace prefix for the specified namespace URL, if declared. If the namespace URL is undef or the empty string, it represents the null namespace. If no prefix is declared for the namespace URL, undef is returned. [MANAKAI]

$url = $ss->manakai_lookup_namespace_uri ($prefix)

Return the namespace URL for the specified namespace prefix, if declared. If the prefix is undef or the empty string, it represents the default namespace (i.e. the namespace for the prefixless type selectors). If no namespace URL is declared for the prefix, undef is returned. If the prefix is bound to the null namespace, the empty string is returned. [MANAKAI]

$media_list = $ss->media

Return the Web::DOM::MediaList representing the list of media queries of the style sheet. [CSSOM]

$ss->media ($string)

Set the specified string as the list of media queries of the style sheet. [CSSOM]

$node = $ss->owner_node

Return the owner node of the style sheet, if any. [CSSOM]

$rule = $ss->owner_rule

Return the owner CSS rule of the style sheet, if any. [CSSOM]

$node = $ss->parent_style_sheet

Return the parent style sheet of the style sheet, if any. [CSSOM]

$string = $ss->title

Return the title of the alternative style sheet set, if any. [CSSOM] [HTML]

$string = $ss->type

Return the MIME type of the style sheet, i.e. text/css. [CSSOM]

DEPENDENCY

See "DEPENDENCY" in Web::DOM.

SPECIFICATIONS

CSSOM

CSS Object Model (CSSOM) <http://dev.w3.org/csswg/cssom/>.

The deleteRule method MUST set the "parent CSS style sheet" of the rules contained by the /old rule/ to null.

The insertRule method MUST use the @namespace at-rules in the style sheet to resolve namespaces, if necessary.

HTML

HTML Living Standard <http://www.whatwg.org/specs/web-apps/current-work/#styling>.

When a CSS style sheet is created from an HTML style element, the owner node of the style sheet MUST be set to the element.

MANAKAI

manakai DOM Extensions <http://suika.suikawiki.org/~wakaba/wiki/sw/n/manakai++DOM%20Extensions>.

SEE ALSO

Web::DOM::CSSRule.

AUTHOR

Wakaba <wakaba@suikawiki.org>.

LICENSE

Copyright 2013 Wakaba <wakaba@suikawiki.org>.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.