Generates a set of CSS properties that can be used to make another
element's background look like the background of a given element.
This is useful when you want to copy the CSS context of an element,
but the element's background is transparent. In the original context
you would see the ancestor's backround color/image showing through,
but in the new context there might be a something different underneath.
Note that this assumes the element you're copying context from has a
fairly standard positioning/layout - it assumes that when the element
has a transparent background what you're going to see through it is its
ancestors.
|
code » | ||||
Given an object containing a set of styles, returns a two-element array
containing the values of background-position-x and background-position-y.
|
code » | ||||
Returns an object containing the set of computedStyle/currentStyle
values for the given element. Note that this should be used with
caution as it ignores the fact that currentStyle and computedStyle
are not the same for certain properties.
|
code » | ||||
![]()
Reads the current css rules from element's document, and returns them
rewriting selectors so that any rules that formerly applied to element will
be applied to doc.body. This makes it possible to replace a block in a page
with an iframe and preserve the css styling of the contents.
Arguments:
Returns: string
String containing all CSS rules present in the original
document, with modified selectors.
|
code » | ||||
![]()
Retrieves the array of css rulesets for this document. A cached
version will be used when possible.
Arguments:
Returns: !Array.<goog.cssom.iframe.style.CssRuleSet_>
An array of CssRuleSet
objects representing the css rule sets in the supplied document.
|
code » | ||||
![]()
Inspects a document and returns all active rule sets
Arguments:
Returns: !Array.<goog.cssom.iframe.style.CssRuleSet_>
An array of CssRuleSet
objects representing all the active rule sets in the document.
|
code » | ||||
Tests whether a value is equivalent to 'transparent'.
|
code » | ||||
![]()
Loads ruleset definitions from a document. If the cache already
has rulesets for this document the cached version will be replaced.
Arguments:
|
code » | ||||
Adds !important to a css color: rule
|
code » | ||||
![]()
Throw away all cached dom information. Call this if you've modified
the structure or class/id attributes of your document and you want
to recalculate the currently applied CSS rules.
|
code » |
![]()
Cache of ruleset objects keyed by document unique ID.
|
Code » |