Expand description
This domain exposes CSS read/write operations. All CSS objects (stylesheets, rules, and styles) have an associated ‘id’ used in subsequent operations on the related object. Each object type has a specific ‘id’ structure, and those are not interchangeable between objects of different kinds. CSS objects can be loaded using the ‘get*ForNode()’ calls (which accept a DOM node id). A client can also keep track of stylesheets via the ‘styleSheetAdded’/‘styleSheetRemoved’ events and subsequently load the required stylesheet contents using the ‘getStyleSheetText’ methods.
Structs§
- AddRule
Params - Inserts a new rule with the given ‘ruleText’ in a stylesheet with given ‘styleSheetId’, at the position specified by ‘location’.
- AddRule
Params Builder - AddRule
Returns - Inserts a new rule with the given ‘ruleText’ in a stylesheet with given ‘styleSheetId’, at the position specified by ‘location’.
- AddRule
Returns Builder - CSSAnimation
Style - CSS style coming from animations with the name of the animation.
- CSSAnimation
Style Builder - CSSAt
Rule - CSS generic @rule representation.
- CSSAt
Rule Builder - CSSComputed
Style Property - CSSComputed
Style Property Builder - CSSContainer
Query - CSS container query rule descriptor.
- CSSContainer
Query Builder - CSSFunction
Condition Node - CSS function conditional block representation.
- CSSFunction
Condition Node Builder - CSSFunction
Node - Section of the body of a CSS function rule.
- CSSFunction
Node Builder - CSSFunction
Parameter - CSS function argument representation.
- CSSFunction
Parameter Builder - CSSFunction
Rule - CSS function at-rule representation.
- CSSFunction
Rule Builder - CSSKeyframe
Rule - CSS keyframe rule representation.
- CSSKeyframe
Rule Builder - CSSKeyframes
Rule - CSS keyframes rule representation.
- CSSKeyframes
Rule Builder - CSSLayer
- CSS Layer at-rule descriptor.
- CSSLayer
Builder - CSSLayer
Data - CSS Layer data.
- CSSLayer
Data Builder - CSSMedia
- CSS media rule descriptor.
- CSSMedia
Builder - CSSNavigation
- CSS Navigation at-rule descriptor.
- CSSNavigation
Builder - CSSPosition
TryRule - CSS @position-try rule representation.
- CSSPosition
TryRule Builder - CSSProperty
- CSS property declaration data.
- CSSProperty
Builder - CSSProperty
Registration - Representation of a custom property registration through CSS.registerProperty
- CSSProperty
Registration Builder - CSSProperty
Rule - CSS property at-rule representation.
- CSSProperty
Rule Builder - CSSRule
- CSS rule representation.
- CSSRule
Builder - CSSScope
- CSS Scope at-rule descriptor.
- CSSScope
Builder - CSSStarting
Style - CSS Starting Style at-rule descriptor.
- CSSStarting
Style Builder - CSSStyle
- CSS style representation.
- CSSStyle
Builder - CSSStyle
Sheet Header - CSS stylesheet metainformation.
- CSSStyle
Sheet Header Builder - CSSSupports
- CSS Supports at-rule descriptor.
- CSSSupports
Builder - CSSTry
Rule - CSS try rule representation.
- CSSTry
Rule Builder - Collect
Class Names Params - Returns all class names from specified stylesheet.
- Collect
Class Names Params Builder - Collect
Class Names Returns - Returns all class names from specified stylesheet.
- Collect
Class Names Returns Builder - Computed
Style Extra Fields - Computed
Style Extra Fields Builder - Create
Style Sheet Params - Creates a new special “via-inspector” stylesheet in the frame with given ‘frameId’.
- Create
Style Sheet Params Builder - Create
Style Sheet Returns - Creates a new special “via-inspector” stylesheet in the frame with given ‘frameId’.
- Create
Style Sheet Returns Builder - Disable
Params - Enable
Params - Font
Face - Properties of a web font: https://www.w3.org/TR/2008/REC-CSS2-20080411/fonts.html#font-descriptions and additional information such as platformFontFamily and fontVariationAxes.
- Font
Face Builder - Font
Variation Axis - Information about font variation axes for variable fonts
- Font
Variation Axis Builder - Force
Pseudo State Params - Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser.
- Force
Pseudo State Params Builder - Force
Starting Style Params - Ensures that the given node is in its starting-style state.
- Force
Starting Style Params Builder - GetAnimated
Styles ForNode Params - Returns the styles coming from animations & transitions including the animation & transition styles coming from inheritance chain.
- GetAnimated
Styles ForNode Params Builder - GetAnimated
Styles ForNode Returns - Returns the styles coming from animations & transitions including the animation & transition styles coming from inheritance chain.
- GetAnimated
Styles ForNode Returns Builder - GetBackground
Colors Params - GetBackground
Colors Params Builder - GetBackground
Colors Returns - GetBackground
Colors Returns Builder - GetComputed
Style ForNode Params - Returns the computed style for a DOM node identified by ‘nodeId’.
- GetComputed
Style ForNode Params Builder - GetComputed
Style ForNode Returns - Returns the computed style for a DOM node identified by ‘nodeId’.
- GetComputed
Style ForNode Returns Builder - GetEnvironment
Variables Params - GetEnvironment
Variables Returns - Returns the values of the default UA-defined environment variables used in env()
- GetEnvironment
Variables Returns Builder - GetInline
Styles ForNode Params - Returns the styles defined inline (explicitly in the “style” attribute and implicitly, using DOM attributes) for a DOM node identified by ‘nodeId’.
- GetInline
Styles ForNode Params Builder - GetInline
Styles ForNode Returns - Returns the styles defined inline (explicitly in the “style” attribute and implicitly, using DOM attributes) for a DOM node identified by ‘nodeId’.
- GetInline
Styles ForNode Returns Builder - GetLayers
ForNode Params - Returns all layers parsed by the rendering engine for the tree scope of a node. Given a DOM element identified by nodeId, getLayersForNode returns the root layer for the nearest ancestor document or shadow root. The layer root contains the full layer tree for the tree scope and their ordering.
- GetLayers
ForNode Params Builder - GetLayers
ForNode Returns - Returns all layers parsed by the rendering engine for the tree scope of a node. Given a DOM element identified by nodeId, getLayersForNode returns the root layer for the nearest ancestor document or shadow root. The layer root contains the full layer tree for the tree scope and their ordering.
- GetLayers
ForNode Returns Builder - GetLocation
ForSelector Params - Given a CSS selector text and a style sheet ID, getLocationForSelector returns an array of locations of the CSS selector in the style sheet.
- GetLocation
ForSelector Params Builder - GetLocation
ForSelector Returns - Given a CSS selector text and a style sheet ID, getLocationForSelector returns an array of locations of the CSS selector in the style sheet.
- GetLocation
ForSelector Returns Builder - GetLonghand
Properties Params - GetLonghand
Properties Params Builder - GetLonghand
Properties Returns - GetLonghand
Properties Returns Builder - GetMatched
Styles ForNode Params - Returns requested styles for a DOM node identified by ‘nodeId’.
- GetMatched
Styles ForNode Params Builder - GetMatched
Styles ForNode Returns - Returns requested styles for a DOM node identified by ‘nodeId’.
- GetMatched
Styles ForNode Returns Builder - GetMedia
Queries Params - GetMedia
Queries Returns - Returns all media queries parsed by the rendering engine.
- GetMedia
Queries Returns Builder - GetPlatform
Fonts ForNode Params - Requests information about platform fonts which we used to render child TextNodes in the given node.
- GetPlatform
Fonts ForNode Params Builder - GetPlatform
Fonts ForNode Returns - Requests information about platform fonts which we used to render child TextNodes in the given node.
- GetPlatform
Fonts ForNode Returns Builder - GetStyle
Sheet Text Params - Returns the current textual content for a stylesheet.
- GetStyle
Sheet Text Params Builder - GetStyle
Sheet Text Returns - Returns the current textual content for a stylesheet.
- GetStyle
Sheet Text Returns Builder - Inherited
Animated Style Entry - Inherited CSS style collection for animated styles from ancestor node.
- Inherited
Animated Style Entry Builder - Inherited
Pseudo Element Matches - Inherited pseudo element matches from pseudos of an ancestor node.
- Inherited
Pseudo Element Matches Builder - Inherited
Style Entry - Inherited CSS rule collection from ancestor node.
- Inherited
Style Entry Builder - Media
Query - Media query descriptor.
- Media
Query Builder - Media
Query Expression - Media query expression descriptor.
- Media
Query Expression Builder - Platform
Font Usage - Information about amount of glyphs that were rendered with given font.
- Platform
Font Usage Builder - Protocol
Value - Data for a simple selector (these are delimited by commas in a selector list).
- Protocol
Value Builder - Pseudo
Element Matches - CSS rule collection for a single pseudo style.
- Pseudo
Element Matches Builder - Resolve
Values Params - Resolve the specified values in the context of the provided element. For example, a value of ‘1em’ is evaluated according to the computed ‘font-size’ of the element and a value ‘calc(1px + 2px)’ will be resolved to ‘3px’. If the ‘propertyName’ was specified the ‘values’ are resolved as if they were property’s declaration. If a value cannot be parsed according to the provided property syntax, the value is parsed using combined syntax as if null ‘propertyName’ was provided. If the value cannot be resolved even then, return the provided value without any changes. Note: this function currently does not resolve CSS random() function, it returns unmodified random() function parts.’
- Resolve
Values Params Builder - Resolve
Values Returns - Resolve the specified values in the context of the provided element. For example, a value of ‘1em’ is evaluated according to the computed ‘font-size’ of the element and a value ‘calc(1px + 2px)’ will be resolved to ‘3px’. If the ‘propertyName’ was specified the ‘values’ are resolved as if they were property’s declaration. If a value cannot be parsed according to the provided property syntax, the value is parsed using combined syntax as if null ‘propertyName’ was provided. If the value cannot be resolved even then, return the provided value without any changes. Note: this function currently does not resolve CSS random() function, it returns unmodified random() function parts.’
- Resolve
Values Returns Builder - Rule
Match - Match data for a CSS rule.
- Rule
Match Builder - Rule
Usage - CSS coverage information.
- Rule
Usage Builder - Selector
List - Selector list data.
- Selector
List Builder - SetContainer
Query Text Params - Modifies the expression of a container query.
- SetContainer
Query Text Params Builder - SetContainer
Query Text Returns - Modifies the expression of a container query.
- SetContainer
Query Text Returns Builder - SetEffective
Property Value ForNode Params - Find a rule with the given active property for the given node and set the new value for this property
- SetEffective
Property Value ForNode Params Builder - SetKeyframe
KeyParams - Modifies the keyframe rule key text.
- SetKeyframe
KeyParams Builder - SetKeyframe
KeyReturns - Modifies the keyframe rule key text.
- SetKeyframe
KeyReturns Builder - SetLocal
Fonts Enabled Params - Enables/disables rendering of local CSS fonts (enabled by default).
- SetLocal
Fonts Enabled Params Builder - SetMedia
Text Params - Modifies the rule selector.
- SetMedia
Text Params Builder - SetMedia
Text Returns - Modifies the rule selector.
- SetMedia
Text Returns Builder - SetNavigation
Text Params - Modifies the expression of a navigation at-rule.
- SetNavigation
Text Params Builder - SetNavigation
Text Returns - Modifies the expression of a navigation at-rule.
- SetNavigation
Text Returns Builder - SetProperty
Rule Property Name Params - Modifies the property rule property name.
- SetProperty
Rule Property Name Params Builder - SetProperty
Rule Property Name Returns - Modifies the property rule property name.
- SetProperty
Rule Property Name Returns Builder - SetRule
Selector Params - Modifies the rule selector.
- SetRule
Selector Params Builder - SetRule
Selector Returns - Modifies the rule selector.
- SetRule
Selector Returns Builder - SetScope
Text Params - Modifies the expression of a scope at-rule.
- SetScope
Text Params Builder - SetScope
Text Returns - Modifies the expression of a scope at-rule.
- SetScope
Text Returns Builder - SetStyle
Sheet Text Params - Sets the new stylesheet text.
- SetStyle
Sheet Text Params Builder - SetStyle
Sheet Text Returns - Sets the new stylesheet text.
- SetStyle
Sheet Text Returns Builder - SetStyle
Texts Params - Applies specified style edits one after another in the given order.
- SetStyle
Texts Params Builder - SetStyle
Texts Returns - Applies specified style edits one after another in the given order.
- SetStyle
Texts Returns Builder - SetSupports
Text Params - Modifies the expression of a supports at-rule.
- SetSupports
Text Params Builder - SetSupports
Text Returns - Modifies the expression of a supports at-rule.
- SetSupports
Text Returns Builder - Shorthand
Entry - Shorthand
Entry Builder - Source
Range - Text range within a resource. All numbers are zero-based.
- Source
Range Builder - Specificity
- Specificity: https://drafts.csswg.org/selectors/#specificity-rules
- Specificity
Builder - Start
Rule Usage Tracking Params - Stop
Rule Usage Tracking Params - Stop
Rule Usage Tracking Returns - Stop tracking rule usage and return the list of rules that were used since last call to ‘takeCoverageDelta’ (or since start of coverage instrumentation).
- Stop
Rule Usage Tracking Returns Builder - Style
Declaration Edit - A descriptor of operation to mutate style declaration text.
- Style
Declaration Edit Builder - Take
Computed Style Updates Params - Take
Computed Style Updates Returns - Polls the next batch of computed style updates.
- Take
Computed Style Updates Returns Builder - Take
Coverage Delta Params - Take
Coverage Delta Returns - Obtain list of rules that became used since last call to this method (or since start of coverage instrumentation).
- Take
Coverage Delta Returns Builder - Track
Computed Style Updates ForNode Params - Starts tracking the given node for the computed style updates and whenever the computed style is updated for node, it queues a ‘computedStyleUpdated’ event with throttling. There can only be 1 node tracked for computed style updates so passing a new node id removes tracking from the previous node. Pass ‘undefined’ to disable tracking.
- Track
Computed Style Updates ForNode Params Builder - Track
Computed Style Updates Params - Starts tracking the given computed styles for updates. The specified array of properties replaces the one previously specified. Pass empty array to disable tracking. Use takeComputedStyleUpdates to retrieve the list of nodes that had properties modified. The changes to computed style properties are only tracked for nodes pushed to the front-end by the DOM agent. If no changes to the tracked properties occur after the node has been pushed to the front-end, no updates will be issued for the node.
- Track
Computed Style Updates Params Builder
Enums§
- CSSRule
Type - Enum indicating the type of a CSS rule, used to represent the order of a style rule’s ancestors. This list only contains rule types that are collected during the ancestor rule collection.
- Style
Sheet Origin - Stylesheet type: “injected” for stylesheets injected via extension, “user-agent” for user-agent stylesheets, “inspector” for stylesheets created by the inspector (i.e. those holding the “via inspector” rules), “regular” for regular stylesheets.