Help Center

Local Navigation

Object: CSSRule

Availability

BlackBerry® Device Software version 4.6 or later

Extended by

CSSCharsetRule, CSSFontFaceRule, CSSImportRule, CSSMediaRule, CSSPageRule, CSSStyleRule, CSSUnknownRule

The CSSRule object is the base class used to define any rule in a CSS Style sheet, including both rule sets and @ rules.

CSSRule constants

Constant

Value type

Description

Support level

Availability

0

UNKNOWN_RULE

A CSSUnknownRule.

DOM 2 Style

4.6 or later

1

STYLE_RULE

A CSSStyleRule.

DOM 2 Style

4.6 or later

2

CHARSET_RULE

A CSSCharsetRule.

DOM 2 Style

4.6 or later

3

IMPORT_RULE

A CSSImportRule.

DOM 2 Style

4.6 or later

4

MEDIA_RULE

A CSSMediaRule.

DOM 2 Style

4.6 or later

5

FONT_FACE_RULE

A CSSFontFaceRule.

DOM 2 Style

4.6 or later

6

PAGE_RULE

A CSSPageRule.

DOM 2 Style

4.6 or later

CSSRule properties

Property name

Type

Description

Status

Support level

Availability

parentRule

CSSRule

Returns the parent rule, if this rule is contained within another rule (for example, a style rule within an @media block).

read only

DOM 2 Style

4.6 or later

parentStyleSheet

CSSStyleSheet

Returns the style sheet that contains this rule.

read only

DOM 2 Style

4.6 or later

type

unsigned short

Returns the type of rule, represented using a CSSRule constant.

read only

DOM 2 Style

4.6 or later

Previous topic: CSSRuleList methods

Was this information helpful? Send us your comments.