cssom.iframe.style.CssRuleSet_ Extends
Class representing a CSS rule set. A rule set is something like this: h1, h2 { font-family: Arial; color: red; }

Inheritance

Constructor

goog.cssom.iframe.style.CssRuleSet_()

Instance Methods

Public Protected Private
Make a copy of this ruleset.
Returns: !goog.cssom.iframe.style.CssRuleSet_  A new CssRuleSet containing the same data as this one.
code »
initializeFromCssRule(cssRule) boolean
Initializes the rule set from a CSSRule.
Arguments:
cssRule : CSSRule
The CSSRule to initialize from.
Returns: boolean  True if initialization succeeded. We only support CSSStyleRule and CSSFontFaceRule objects.
code »
setDeclarationTextFromObject(sourceObjectopt_important)
Set the declaration text with properties from a given object.
Arguments:
sourceObject : Object
Object whose properties and values should be used to generate the declaration text.
opt_important : boolean=
Whether !important should be added to each declaration.
code »
setSelectorsFromString(selectorsString)
Parses a selectors string (which may contain multiple comma-delimited selectors) and loads the results into this.selectors.
Arguments:
selectorsString : string
String containing selectors.
code »
writeToArray(array)
Serializes this CssRuleSet_ into an array as a series of strings. The array can then be join()-ed to get a string representation of this ruleset.
Arguments:
array : Array.<string>
The array to which to append strings.
code »

Instance Properties

declarationText :
Text of the declarations inside the rule set. For example: 'font-family: Arial; color: red;'
Code »
selectors :
Array of CssSelector objects, one for each selector. Example: [h1, h2]
Code »

Package cssom.iframe.style

Package Reference