Dart API Referencedart:htmlCSSRule

CSSRule Interface

An object implementing the CSSRule DOM interface represents a single CSS rule. References to a CSSRule-implementing object may be obtained by looking at a CSS style sheet's cssRules list.

There are several kinds of rules. The CSSRule interface specifies the properties common to all rules, while properties unique to specific rule types are specified in the more specialized interfaces for those rules' respective types.

Subinterfaces

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

Static Fields

Code final int CHARSET_RULE #

static final int CHARSET_RULE = 2;

Code final int FONT_FACE_RULE #

static final int FONT_FACE_RULE = 5;

Code final int IMPORT_RULE #

static final int IMPORT_RULE = 3;

Code final int MEDIA_RULE #

static final int MEDIA_RULE = 4;

Code final int PAGE_RULE #

static final int PAGE_RULE = 6;

Code final int STYLE_RULE #

static final int STYLE_RULE = 1;

Code final int UNKNOWN_RULE #

static final int UNKNOWN_RULE = 0;

Code final int WEBKIT_KEYFRAMES_RULE #

static final int WEBKIT_KEYFRAMES_RULE = 7;

Code final int WEBKIT_KEYFRAME_RULE #

static final int WEBKIT_KEYFRAME_RULE = 8;

Fields

Code String cssText #

Returns the textual representation of the rule, e.g. "h1,h2 { font-size: 16pt }"
String cssText;

Code final CSSRule parentRule #

Returns the containing rule, otherwise null. E.g. if this rule is a style rule inside an @media block, the parent rule would be that CSSMediaRule.
final CSSRule parentRule;

Code final CSSStyleSheet parentStyleSheet #

Returns the CSSStyleSheet object for the style sheet that contains this rule
final CSSStyleSheet parentStyleSheet;

Code final int type #

One of the Type constants indicating the type of CSS rule.
final int type;

This page includes content from the Mozilla Foundation that is graciously licensed under a Creative Commons: Attribution-Sharealike license. Mozilla has no other association with Dart or dartlang.org. We encourage you to improve the web by contributing to The Mozilla Developer Network.