CSS Domain
The CSS domain is used to inspect the CSS state at particular execution points.
All commands and events in this domain must include both a sessionId
and a pauseId
.
Methods
Types
Methods
CSS.getAppliedRules #
Get the style rules being applied to a node.
parameters
- node
-
Pause.ObjectId
Return Object
- rules
-
array[ AppliedRule ]
All style rules being applied to the node. This includes rules that apply directly to this node or to one of its pseudo-elements. Rules are grouped by their pseudo-element (if any) and are ordered by precedence, with higher priority rules (higher specificity, or later appearance in style sheets) given first.
- data
-
Pause.PauseData
Information about the rules and related objects.
CSS.getComputedStyle #
Get the styles computed for a node.
parameters
- node
-
Pause.ObjectId
Return Object
- computedStyle
-
array[ ComputedStyleProperty ]
Types
CSS.AppliedRule #
Information about a rule applied to a node.
Type: object
properties
- rule
-
Pause.ObjectId
ID of the rule being applied to the node.
- pseudoElement
-
string
Pseudo-element of the node the rule is applied to, if any.
CSS.ComputedStyleProperty #
A style which is applied to a node.
Type: object
properties
- name
-
string
Name of the style.
- value
-
string
Value of the style.
CSS.OriginalStyleSheetLocation #
Location of a rule within an original style sheet.
Type: object
properties
- href
-
string
URL of the original style sheet.
- startLine
-
integer
Start line in the style sheet (1-indexed).
- startColumn
-
integer
Start column in the style sheet (0-indexed).
CSS.Rule #
Description of a CSSRule's contents which is attached to its
associated Pause.ObjectPreview.rule
.
Type: object
properties
- type
-
integer
Value of
rule.type
. - cssText
-
string
Value of
rule.cssText
. - parentStyleSheet
-
Pause.ObjectId
The ID of any style sheet this rule is associated with.
- startLine
-
integer
Start line in the parent style sheet (1-indexed).
- startColumn
-
integer
Start column in the parent style sheet (0-indexed).
- originalLocation
-
OriginalStyleSheetLocation
If the parent style sheet is source mapped, the original location of the rule.
- selectorText
-
string
For
CSSStyleRule
objects, the value ofrule.selectorText
. - style
-
Pause.ObjectId
For
CSSStyleRule
objects, the ID of the rule's style declaration.
CSS.StyleDeclaration #
Description of a CSSStyleDeclaration's contents which is attached to its
associated Pause.ObjectPreview.style
.
Type: object
properties
- cssText
-
string
Value of
style.cssText
. - parentRule
-
Pause.ObjectId
If this declaration originates from a CSSStyleRule, ID of that rule.
- properties
-
array[ StyleProperty ]
Style properties of this declaration.
CSS.StyleProperty #
Information about a style property declaration.
Type: ComputedStyleProperty
properties
- important
-
boolean
Whether the property is marked
!important
. Defaults tofalse
if omitted.
CSS.StyleSheet #
Description of a StyleSheet's contents which is attached to its
associated Pause.ObjectPreview.styleSheet
.
Type: object
properties
- href
-
string
URL of the style sheet.
- isSystem
-
boolean
Whether this sheet is internal to the browser itself.